Prepare Interview

Exams Attended

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

JavaScript Interview Questions and Answers

Ques 1. What are JavaScript data types?

  • Number
  • String
  • Boolean
  • Function
  • Object
  • Null
  • Undefined.

Is it helpful? Add Comment View Comments
 

Ques 2. 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);

Is it helpful? Add Comment View Comments
 

Ques 3. What does isNaN function do?

Return true if the argument is not a number.

Example:
isNaN(123) //returns false
isNaN('Hello John') //returns true

Is it helpful? Add Comment View Comments
 

Ques 4. What looping structures are there in JavaScript?

Looping structures are:
  • for
  • while
  • do-while
  • foreach

Is it helpful? Add Comment View Comments
 

Ques 5. What boolean operators does JavaScript support?

Boolean operators in JavaScript are:
  • &&
  • ||
  • !

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

©2021 WithoutBook