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 is output of “20” + 20? In javascript?
Which is faster jquery or javascript?
What is the purpose of local variables?
Is javascript object a hash table?
How to change the background color of HTML document using JavaScript?
Can you have a function within a function in javascript?
what is function of stdio.h
Is javascript a dynamic language?
all possible test cases for normal number field,name field date field,check box,
What is meaning of === in javascript?
How to define name function in javascript?
What will be the output of the following statements?
What creates scope in javascript?
Define anonymous function.
Why is javascript hoisting?