JavaScript Quiz

1. The event occurs when an HTML document finishes loading in a Web browser.

load
complete
display
click

2. Scripting code in a document is located.

after the closing script tag>
between the script.../script tag pairs
inside the closing bracket of the script tag
before the closing script tag

3. You create line comments in JavaScript code by adding to a line you want to use as a comment using

ll
**
\\
//

4. JavaScript code cannot include both line comments and block comments.

true
false

5. An if statement can include multiple statements provided that they;

execute after the if statement�s closing semicolon
do not include other if statements
are not contained within a command block
are contained within a command block

6. JavaScript is case sensitive.True or False?

true
false

7. How are JavaScript code sections executed in a document?

Each JavaScript code section is executed in the order in which it appears
All embedded JavaScript code is executed first
Each JavaScript code section is executed according to the sequence in which you added it to the document
All JavaScript source files are executed first.

8. You are not required to use the var keyword to declare a variable.True or false?

true
false

9. When is a for statement initialization expression executed?

when the for statement begins executing
with each repetition of the for statement
when the for statement ends
when the counter variable increments

10. The Document object represents.

the Web browser window()
the Web page displayed in a window()
the object in a form()
all JavaScript functions and methods within a Web page

Hosted by www.Geocities.ws

1