How do you convert numbers between different bases in
JavaScript?
Answer Posted / venkateswaran
using Number() function we can converts the value of an
object to a number.
Example:
var test1= new Boolean(true);
var test2= new Date();
var test3= new String("999");
document.write(Number(test1)+ "<br />");
document.write(Number(test2)+ "<br />");
document.write(Number(test3)+ "<br />");
| Is This Answer Correct ? | 11 Yes | 3 No |
Post New Answer View All Answers
What will happen if an infinite while loop is run in Javascript?
What is dom in javascript?
How do you check if an object is an array or not?
What are different types of popup boxes available in javascript?
What is javascript used for on iphone?
Which is faster jquery or javascript?
What are the different functional component in javascript?
What are associative arrays in javascript?
What does the delete operator do?
Difference between the substr() and substring() in JavaScript?
What is node value?
What is namespacing in javascript and how is it used?
What are the data types available in javascript? Explain
What is difference between callback and promise?
What is use of settimeout function in javascript?