How do you convert numbers between different bases in
JavaScript?
Answer Posted / heena
Use the parseInt() function, that takes a string as the
first parameter, and the base as a second parameter. So to
convert hexadecimal 3F to decimal, use parseInt ("3F", 16)
| Is This Answer Correct ? | 6 Yes | 3 No |
Post New Answer View All Answers
all possible test cases for normal number field,name field date field,check box,
What kind of conditional statements does JavaScript support?
What Is The Disadvantages Using InnerHTML In JavaScript?
What is the use of a number object in javascript?
What does the operator do in javascript?
How can you convert the string of any base to integer in JavaScript?
What are the variable naming conventions in javascript?
what is lazy fetching in hibernate
What is the use of blur function?
How many types of functions JavaScript supports?
what are the differences between as2 and as3?
In a java script, what is the difference between "==" and "===" operator?
Is javascript backend or frontend?
What is new keyword in javascript?
What are javascript closures?when would you use them?