|
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.2) By 9785 users |
Added on |
10/7/2012 10:32:08 PM |
Views |
66967 |
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 are JavaScript types?
|
View Answer
|
|
What’s relationship between JavaScript and ECMAScript?
|
View Answer
|
|
How do I ...with JavaScript/JScript ... script a visit counter?
|
View Answer
|
|
How do I ... with JavaScript/JScript ... submit forms by e-mail?
|
View Answer
|
|
How do I ... with JavaScript/JScript ... use quotation marks when scripting?
|
View Answer
|
|
How do I ... with JavaScript/JScript ... use the same variable name several times in a script?
|
View Answer
|
|
How do I ... with JavaScript/JScript ... embed JavaScript in a web page?
|
View Answer
|
|
How is JavaScript syntax like C / C++?
|
View Answer
|
|
How does JavaScript model the world?
|
View Answer
|
|
What are the language's basic entities?
|
View Answer
|
|
Where is the official bug list for JavaScript?
|
View Answer
|
|
Where can I find online documentation for JavaScript?
|
View Answer
|
|
What is JavaScript?
|
View Answer
|
|
How i will use email validation in java script, Like. User can't enter invalid email address?
|
View Answer
|
|
What is the main difference between Client side Java Script and and Server side Java Script how actully they run on both side with Example
|
View Answer
|
|
I do not want to go next field without filling the text? Whic function i should use. Phone No Text validation in javascript
|
View Answer
|