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


Please Help Members By Posting Answers For Below Questions

What are the seven data types of javascript?

722


What is the use of a typedarray object in javascript?

664


How to convert javascript date to iso standard?

687


How to make elements invisible?

876


What does the term sticky session mean in a web-farm scenario?

696


What is the difference between innerHTML and innerText?

708


What are the methods involved in javascript?

680


What are types of javascript?

650


Explain javascript debounce function?

748


Difference between undefined and undeclared variables?

680


java pgme for class members hours:minutes:seconds then the constructor expects milliseconds as assignment and initialize data members the members function print hh:mm:ss 90,000 milliseconds passed in constructor then the output is 00:01:30

1699


What is Browser Object Model?

727


What is hoisted in javascript?

673


How do you name a variable in javascript?

643


How do you check if an object is an array or not?

687