The function to calculate from hex to decimal is based upon a similar concept to the function to convert
from decimal to hex. The crux to both of these functions is the use of the hexString to perform the
conversion. The charAt() method returns the character at a specific index in a string. In the hex string,
each index refers to its hexadecimal counter part. For example,
hexString.charAt(8)
returns the value 8. Likewise, the expression,
hexString.charAt(15)
returns the value F.
Close Window