Answer:
By using the parseInt() function, we can convert numbers between different bases in JavaScript. This function takes a string as the first parameter, and the base as a second parameter.
Example:
To convert hexadecimal 3F to decimal, we use
parseInt ("3F", 16);
Asked In: Many Interviews |
Alert Moderator