The next several exercises are timed. If you type slowly or dislike time pressure, feel free to increase the allotted time.
Name and email required. Check any number of boxes.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19
0
0
0
The user's input is stored in a ______. | variable | ^ *variable *$ | |
What is the keyword for declaring a variable? | var | ^ *var *$ | |
Fill in the blank to read and store the user's email address entry. The ID of the field is "mail". | var whatUserEntered = __________.val(); | $("input#mail") | ^ *\$\(•input#mail•\) *$ |
Fill in the blank to read and store the user's email address entry. | var whatTheUserEntered = $("input#mail")______ | .val(); | ^ *\.val\(\); *$ |
5. Drag-and-drop: Holding down the left mouse button, drag the pieces of code onto the screen to read and store the user's entry. The variable is city. The field ID is also "city". | var city = $("input#city").val(); | ||
Read the user's entry in the field with an ID of "name". Store it in the variable moniker. | var moniker = $("input#name").val(); | var`1spacemoniker`1space=`1space$`(`"`input`#`name`"`)`.`val`(`)`; | |
Read the user's entry in the field with an ID of "f1" and store it in the variable prof. | var prof = $("input#f1").val(); | ||
You're storing the user's entry in the variable city. Code the first 2 words of the statement, including the space between them. | var city | ^ *var city *$ | |
You're storing the user's entry in the variable city. The ID of the field is "muni". Code everything before the dot. | var city = $("input#muni") | ^ *var city = \$\(•input#muni•\)*$ | |
You're storing the user's entry in the variable city. The ID of the field is "muni". Code the entire statement. | var city = $("input#muni").val(); | ^ *var city = \$\(•input#muni•\)\.val\(\);*$ | |
You're storing the user's entry in a variable of your choice. The ID of the field is "firstName". Code the entire statement. | var nameFirst = $("input#firstName").val(); | ^ *var .+ = \$\(•input#firstName•\)\.val\(\);*$ | |
You're storing the user's entry in a variable of your choice. The ID of the field is also your choice. Code the entire statement. | var nameLast = $("input#lastName").val(); | ^ *var .+ = \$\(•input#.+•\)\.val\(\);*$ | |
Read the user's entry in the field with an ID of "f1" and store it in the variable prof. | var prof = $("input#f1").val(); | ^ *var prof = \$\(•input#f1•\)\.val\(\); *$ | |
You're storing the user's entry in the variable city. Code the first two words of the statement, including the space between them. | var city | ^ *var city *$ | |
You're storing the user's entry in the variable city. The ID of the field is "muni". Code everything before the dot. | var city = $("input#muni") | ^ *var city = \$\(•input#muni•\)*$ | |
You're storing the user's entry in the variable city. The ID of the field is "muni". Code the entire statement. | var city = $("input#muni").val(); | ^ *var city = \$\(•input#muni•\)\.val\(\);*$ | |
You're storing the user's entry in a variable of your choice. The ID of the field is "firstName". Code the entire statement. | var nameFirst = $("input#firstName").val(); | ^ *var .+ = \$\(•input#firstName•\)\.val\(\);*$ | |
You're storing the user's entry in a variable of your choice. The ID of the field is also your choice. Code the entire statement. | var nameLast = $("input#lastName").val(); | ^ *var .+ = \$\(•input#.+•\)\.val\(\);*$ | |
http://jsfiddle.net/ASmarterWayToLearn/xcgafjcm/ | |||
http://jsfiddle.net/ASmarterWayToLearn/p85329e2/ |