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 does triple dot mean?
what is the function of public class main ?
How does javascript work?
What is event bubbling in the dom?
How do you check if an object is an array or not?
how to run the servlet in tomcat
Explain how to read and write a file using javascript?
Are all javascript variables global?
Explain a story about javascript performance problems?
Is javascript server side or client side?
What is foreach loop in javascript?
What is an external javascript?
Is there any difference between javascript and jscript?
What is the difference between innerhtml and append() in javascript?
hello sir my name is naga sekhar i completed my b-tech in 2011 with 61% in IT streme.I completed my core and advanced java coure before 8months back.Still i did not get the job.i tried so many times.and i went to some interviews but no use.now i want to get the job in software sector