JavaScript Fundamentals Quiz

Test your knowledge of basic JavaScript concepts including output methods, dialogs, console, syntax, and statements

10 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Finish the code below to write the message "I'm a programmer!" to a web page:

  1. document.write("I'm a programmer!"))
  2. document.write("I'm a programmer!");
  3. document.write("I'm a programmer!)
Question 2 Multiple Choice (Single Answer)

Which function will open an alert dialog with the message "Warning!"

  1. alert ("Warning)';
  2. alert (Warning!)
  3. alert("Warning!");
  4. alert ("Warning) )';
Question 3 Multiple Choice (Single Answer)

JavaScript is not Java

  1. True
  2. False
Question 4 Multiple Choice (Single Answer)

Which points you to the exact lines where errors occur & allows messages to be written?

  1. Javascript program
  2. Java data
  3. Javascript console
Question 5 Multiple Choice (Single Answer)

Which JS command tells a browser to open a dialog box with a message?

  1. console.log()
  2. alert ()
  3. document.write
  4. script ( )
Question 6 Multiple Choice (Single Answer)

Part of browser that reads/understands and runs the instruction in a Javascript program.

  1. javascript interpreter
  2. javascript console
  3. SRC attribute
Question 7 Multiple Choice (Single Answer)

How do you link a JavaScript file to a web page?

  1. using the alert tag and src property
  2. using the <script> tag and src property
  3. using the document.write and src property
Question 8 Multiple Choice (Single Answer)

What type of punctuation does a statement ends with?

  1. colon:
  2. semicolon;
  3. question mark ?
  4. exclamation mark !
Question 9 Multiple Choice (Single Answer)

The fundamental building blocks of a program.

  1. statement
  2. syntax
  3. alert
  4. javascript console
Question 10 Multiple Choice (Single Answer)

A programming language commands, special words, & punctuation used in programming

  1. google docs
  2. alert
  3. syntax
  4. javascript