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?

Answers were Sorted based on User's Feedback



How do you convert numbers between different bases in JavaScript?..

Answer / kmbkrishnan

using parseInt(value,base)

Is This Answer Correct ?    23 Yes 2 No

How do you convert numbers between different bases in JavaScript?..

Answer / 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

How do you convert numbers between different bases in JavaScript?..

Answer / rubin thomas

also parseFloat(number,base)

Is This Answer Correct ?    12 Yes 5 No

How do you convert numbers between different bases in JavaScript?..

Answer / heena

Use the parseInt() function, that takes a string as the
first parameter, and the base as a second parameter. So to
convert hexadecimal 3F to decimal, use parseInt ("3F", 16)

Is This Answer Correct ?    6 Yes 3 No

Post New Answer

More JavaScript Interview Questions

what is the difference between the below two statements:- (1) var myname = "akiii"; (2) myname = "akiii";

0 Answers  


Describe negative infinity in javascript?

0 Answers  


How do I link an external javascript file to html?

0 Answers  


What would you use javascript for?

0 Answers  


What is string in javascript?

0 Answers  


Can any one tell me how Java is purely an Oops language

3 Answers  


What is the statement to enable strict mode in javascript quiz?

0 Answers  


What will be the output of the following code? //nfe (named function expression) var Foo = Function Bar() { return 7; }; typeof Bar();

1 Answers  


TypeError: document.getelementbyid(...) is null?

0 Answers  


Where do you put javascript in html?

0 Answers  


How can you to add javascript to a page when performing an asynchronous postback?

0 Answers  


how to run the servlet in tomcat

0 Answers   DELL, TCS,


Categories