RSS Feed for Javascript Interview QuestionsCategory: Javascript Interview Questions

What does undefined value mean in javascript? »

Undefined value means the variable used in the code doesnt exist or is not assigned any value or the property doesnt exist.

What does javascript null mean? »

The null value is a unique value representing no value or no object.
It implies no object,or null string,no valid boolean value,no number and no array object.

Name the numeric constants representing max,min values »

Number.MAX_VALUE
Number.MIN_VALUE

How to comment javascript code? »

Use // for line comments and
/*
*/ for block comments

How to hide javascript code from old browsers that dont run it? »

Use the below specified style of comments
script language=javascript
or Use the tags and code the display html statements between these and this will appear on the page if the browser does not support javascript

Can javascript code be broken in different lines? »

Breaking is possible within a string statement by using a backslash \ at the end but not within any other javascript statement.
that is ,
document.write(”Hello \world”);
is possible but not
document.write \
(”hello world”);

What is a prompt box? »

A prompt box allows the user to enter input by providing a text box.

What is the difference between an alert box and a confirmation box? »

An alert box displays only one button which is the OK button whereas the Confirm box displays two buttons namely OK and cancel.