How do you convert numbers between different bases in
JavaScript?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

what is lazy fetching in hibernate

1532


What is a fixed-width table and its advantages?

504


Explain how to write class methods vs. Instance methods.

529


What would be the result of 2+5+”3″?

540


Who introduced javascript?

502






How many types of data types are there?

458


How do I open javascript on my iphone?

499


Should I learn java first or javascript?

495


What does the term sticky session mean in a web-farm scenario? Why would you use a sticky session? What is the potential disadvantage of using a sticky session?

513


What would you use javascript for?

498


what does javascript null mean?

562


How generic objects can be created?

487


How do you declare in javascript?

474


What is the difference between the operators ‘==‘ & ‘===‘?

491


What is this? Var myarray = [[[]]];

596