HTML and CSS Reference
In-Depth Information
Objective review
1. Which of the following keywords provide iterative control flow?
A. if statement
B. switch statement
for
C.
D. break
Which of the following array methods combines two arrays?
A. join
B. combine
C. split
D. concat
2.
Which iterative control syntax can guarantee that the loop is processed at least once?
A. for…in loop
B. while loop
C. do…while loop
3.
for loop
D.
Which keyword is used to exit a loop?
A. continue
B. break
C. stop
D. next
4.
Objective 2.2: Raise and handle an event
The browser provides dynamic behavior through events. Actions processed by the browser
user can trigger an opportunity for your code to react and create an experience for the user.
This opportunity is presented in the form of an event. The DOM elements natively provide
events that can be handled, and you can implement custom events on custom objects.
Events typically follow a naming convention. When looking at what events are available on
a particular object, you can identify those events as properties that start with the prefix on .
For example, some common events are onkeypress or onblur . For events to function, you need
to “wire them up” by assigning an event handler. The event handler is a JavaScript function
that's called when an action triggers the event. Events are firing all the time in the browser;
 
 
 
Search WWH ::




Custom Search