Quiz
Test your knowledge of the JavaScript concepts covered in this hour by answering the following questions.
Questions
A script that executes when the user clicks the mouse button is an example of what?
An object
An event handler
An impossibility
Which of the following are capabilities of functions in JavaScript?
Accept parameters
Return a value
Both of the above
Which of the following is executed first by a browser?
A script in the <head> section
A script in the <body> section
An event handler for a button
Answers
A script that executes when the user clicks the mouse button is an event handler.
Functions can both accept parameters and return values.
Scripts defined in the <head> section of an HTML document are executed first by the browser.