JavaScript Interview questions

Total available count: 22
Subject - JavaScript Frameworks
Subsubject - JavaScript

What is a prompt box?

A prompt box is a box which allows the user to enter input by providing a text box popup.  When a prompt box pops up, the user will have to click either "OK" or "Cancel" to proceed after entering an input value. 

  • If the user clicks "OK" the box returns the input value as shown in the below code
  • If the user clicks "Cancel" the box returns null.

var website = prompt("Please enter the website name - ", "Slightbook");

Next 5 interview question(s)

Which symbol is used for comments in JavaScript?
What is the difference between == and === operator?
What are setTimeout, setInterval and clearInterval in JavaScsript?
What do mean by NULL in JavaScript?
What is an undefined value in JavaScript?