Showing posts with label Question_Javascript. Show all posts
Showing posts with label Question_Javascript. Show all posts
Javascript Interview Questions and Answers For Freshers/Experienced Candidates
Posted by Raj
Javascript Interview Questions and Answers
In this section, I have selected advanced javascript interview questions and answers for Freshers/Experienced Candidates.Last few months I have been working to select best question and answer set for JavaScript interview questions.I have written some JavaScript tutorials.
What are JavaScript types?
Number, String, Boolean, Function, Object, Null, Undefined.
How do you convert numbers between different bases in JavaScript?
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);
What does "1"+2+3 evaluate to?
Since 1 is a string, everything is a string, so the result is 123.
How about 3+5+"8"?
Since 3 and 5 are integers, this is number arithmetic, since 8 is a string, it’s concatenation, so 88 is the result.