1
2
3
4
5
6
7
8
9
10
To practice on your own, or to check code you believe shouldn't have been scored as incorrect, go to CodePen.
0,1,2,3,4,5,6,7,8,9
0
0
0
0
What are the first 4 characters of an if statement? | if ( | if\( | |
What character ends the first line of an if statement? | { | { | |
Code the first line of an if statement that tests whether the variable teammates has the value of 8. | if (teammates === 8) { | if\(teammates===8\){ | |
Type the last line of an if statement. | } | } | |
Type the incorrect character you see here. | if (x = y) { | = | = |
Following is the first line of an if statement. Code the next line. If the condition is true, display an alert that says, "Hi, John". Don't worry about indenting. | if (firstName === "John") { | alert("Hi, John"); | alert\(•Hi,John•\); |
Code the first line of an if statement that tests whether one variable has the same value as another. Make up the variable names. | if (firstName === nickname) { | if\([a-z_$][a-zA-Z0-9_$]*===[a-z_$][a-zA-Z0-9_$]*\){ | |
Code the first line of an if statement that tests whether a variable has the value of a particular string. Make up the variable name and the string. | if (gender === "female") { | if\([a-z_$][a-zA-Z0-9_$]*===•.*•\){ | |
|
|||
|