Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Does javascript have the concept level scope?

945


List some design patterns in javascript?

807


What is callback in javascript?

925


how to run the servlet in tomcat

2048


What are the main functions performed by javascript statements?

969


What is new keyword in javascript?

817


What is scope of variable in javascript?

939


How do you add an element at the beginning of an array?

894


Is JavaScript case sensitive? Give an example?

970


What is console.log()?

902


What are escape characters in javascript?

876


Explain spread operator in javascript?

881


What is difference between scripting and programming?

839


To set all checkboxes to true using javascript?

1007


What are the primitive data types in JavaScript?

975