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

What is Unobtrusive JavaScript & Why it's Important?

1139


What are the different objects used in javascripts?

1004


Are you concerned that older browsers don't support javascript and thus exclude a set of web users? Individual users?

1077


What does the "Access is Denied" IE error mean?

1363


What is output of “20” + 20? In javascript?

995


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

1006


How do I add javascript to chrome?

973


What is called variable?

939


What are the different actions that are performed using javascript?

1119


Explain spread operator in javascript?

1005


Can I learn javascript without html?

1003


How to create an array in javascript?

1105


What is the main difference between Map collections and other collections such as Set.

3078


Why it is not advised to use innerhtml in javascript?

972


What is the use of debugger keyword in javascript?

949