Sams Teach Yourself JavaScript in 24 Hours

Sams Teach Yourself JavaScript in 24 Hours

By Michael Moncur

Quiz

Test your knowledge of the JavaScript concepts covered in this hour by answering the following questions.

Questions

1:

A script that executes when the user clicks the mouse button is an example of what?

  1. An object
  2. An event handler
  3. An impossibility
A1:

b. A script that executes when the user clicks the mouse button is an event handler.

2:

Which of the following are capabilities of functions in JavaScript?

  1. Accept parameters
  2. Return a value
  3. Both of the above
A2:

c. Functions can both accept parameters and return values.

3:

Which of the following is executed first by a browser?

  1. A script in the <head> section
  2. A script in the <body> section
  3. An event handler for a button
A3:

a. Scripts defined in the <head> section of an HTML document are executed first by the browser.

Share ThisShare This

Informit Network