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
The variable being tested is shape. Fill in the blank. | switch ________ { | (shape) | \(shape\) |
Fill in the blank. | switch (shape) _ | { | { |
Code the first line of a switch statement that tests the variable species. | switch (species) { | switch\(species\){ | |
Code the first line of a switch statement that tests the variable score. | switch (score) { | switch\(score\){ | |
Code the first line of a switch statement that tests a variable. Make up the name of the variable. | switch (x) { | switch\([a-z_$][a-zA-Z0-9_$]*\){ | |
Fill in the blank. Make up an integer value. | case _______ | 50: | (0|-?[1-9][\d]*): |
Code the second line, testing whether the value is "blue". Don't bother to indent. | case "blue": | case•blue•: | |
Fill in the blank to end the testing. | switch (registered) { case true: alert("Congratulations"); _______ } |
break; | break; |
|
|||
|