How can you convert the string of any base to integer in JavaScript?
0
The parseInt() function is used to convert numbers between different bases. parseInt() takes the string to be converted as its first parameter, and the second parameter is the base of the given string.
In order to convert 4F (of base 16) to integer, the code used will be -
parseInt ("4F", 16);
Sign in to add a comment
0 Answers
0
📝 No answers yet!
Be the first to answer this interview question.
Your Answer
Sign in to post your answer and help the community.