|
INTERVIEW QUESTIONS
WEB
JAVA SCRIPT
DETAILS
Question: How do you convert numbers between different bases in JavaScript?
Answer: 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);
|
|
|
Category |
Java Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.3) By 8151 users |
Added on |
9/4/2014 |
Views |
70633 |
Rate it! |
|
|
Question:
How do you convert numbers between different bases in JavaScript?
Answer:
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); Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
what is the differene between java and java script…?
|
View Answer
|
|
How do you convert numbers between different bases in JavaScript?
|
View Answer
|
|
What looping structures are there in JavaScript?
|
View Answer
|
|
How do you create a new object in JavaScript?
|
View Answer
|
|
How can we hide HTML source code from users? This website is created with Java Script language.
|
View Answer
|
|
How do you target a specific frame from a hyperlink?
|
View Answer
|
|
How do you convert numbers between different bases in JavaScript?
|
View Answer
|
|
How can JavaScript make a Web site easier to use? That is, are there certain JavaScript techniques that make it easier for people to use a Web site?
|
View Answer
|
|
How to read and write a file using javascript?
|
View Answer
|
|
How do we get JavaScript onto a web page?
|
View Answer
|
|
What’s relationship between JavaScript and ECMAScript?
|
View Answer
|
|
How do you submit a form using Javascript?
|
View Answer
|
|
What does undefined value mean in javascript?
|
View Answer
|
|
What does javascript null mean?
|
View Answer
|
|
Name the numeric constants representing max,min values
|
View Answer
|
|
How to comment javascript code?
|
View Answer
|
|
How to hide javascript code from old browsers that dont run it?
|
View Answer
|
|
Can javascript code be broken in different lines?
|
View Answer
|
|
What is a prompt box?
|
View Answer
|
|
What is the difference between an alert box and a confirmation box?
|
View Answer
|