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 is the comparison operator is greater than? | > | > | |
What is the comparison operator is less than or equivalent to? | <= | <= | |
Code the first line of an if statement that tests whether num1 is greater than num2. | if (num1 > num2) { | if\(num1>num2\){ | |
Code the first line of an if statement that tests whether num1 is greater than or equivalent to num2. | if (num1 >= num2) { | if\(num1>=num2\){ | |
Code the first line of an if statement that tests whether one variable is not equivalent to 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's value isn't equivalent to a particular string. Make up the variable name and the string. | if (gender !== "female") { | if\([a-z_$][a-zA-Z0-9_$]*!==•.*•\){ | |
Code the first line of an if statement that tests whether a variable's value is less than a particular number. Make up the variable name and the number. | if (num < 1) { | if\([a-z_$][a-zA-Z0-9_$]*<[-]?(?:[.]\d+|\d+(?:[.]\d*)?)\){ | |
Code the first line of an if statement that tests whether a string is not equivalent to a particular variable's value. Make up the string and the variable name. | if ("Mexico" !== countryOfOrigin) { | if\(•[a-z_$][a-zA-Z0-9_$]*•!==.*\){ | |
|
|||
|