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

How to create a cookie using javascript?

500


What is the use of 'bind' method in JavaScript?

548


What does === mean in js?

481


What are the limitations of javascript?

468


What is a function object?

476






What is the difference between a web-garden and a web-farm?

477


What is console.log() and why it is used?

582


What is the difference between HTMLCollection and NodeList?

536


What is the use of math object in javascript?

507


Why javascript is so popular?

450


How to clone an object in javascript?

533


What are the data types in js?

478


How to get value from radiobuttonlist control?

491


Create a new javascript object with the keys of “fname” equal to your first name, “lname” equal to your last name, and “fcolors” equal to and array of 3 of your favorite colors. Assign this object to a variable called “me” and log it to the console.

608


What is use of flutter?

489