JavaScript Quiz Questions and Answers

Which function of an Array object calls a function for each element in the array?

Answer :
  • forEach()

JavaScript can be written __________.

Answer :
  • Directly into JS file and included into HTML

JavaScript is a ________ Side Scripting Language.

Answer :
  • Browser

What so JavaScript and Java have similar name?

Answer :
  • Javascript's syntax is loosely based on Java's

What should appear at the very end of you Javascript? The < script LANGUAGE = "JAVASCRIPT " > tag

Answer :
  • The < /script >

…... Tag is an extension to HTML that can enclose any number of Javascript statements.

Answer :
  • < SCRIPT >

How does JavaScript store dates in date object?

Answer :
  • The number of milliseconds since January 1st, 1970

What is the correct Javascript syntax to write "Hello World "?

Answer :
  • document.write( "Hello World ")

Which of the following way can be used to indicate the LANGUAGE attribute?

Answer :
  • < SCRIPT LANGUAGE= "JavaScriptVersion " > JavaScript statements..< /SCRIPT >

Inside which HTML element do we put the JavaScript?

Answer :
  • < script >