JavaScript For Developers Quiz Questions and Answers

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 >

Which is the correct way to write a JavaScript array?

Answer :
  • var txt = new Array( "time ",'kim ",'jim ")

JavaScript entities start with _______ and end with _________.

Answer :
  •  Ampersand, semicolon

If para1 is the DOM object for a paragraph, what is the correct syntax to change the text within the paragraph?

Answer :
  •  para1.value= "New Text ";