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
If a number is enclosed in quotes, it's a ______. | string | string | |
What is the value of orderTotal? | let merchTotal = 100; let shippingCharge = 10; let orderTotal = merchTotal + shippingCharge; |
110 | 110 |
In a single statement, declare the variable numberAsString and assign the number 3 to it as a string. | let numberAsString = "3"; | letnumberAsString=•3•; | |
Assign to the variable caseQty, which has already been declared, the value 144. | caseQty = 144; | caseQty=144; | |
In a single statement declare a variable and assign a number to it. Make up the variable name and the number. | let x = 0; | let.*=[-]?(?:[.]\d+|\d+(?:[.]\d*)?); | |
In a single statement declare a variable and assign to it the sum of 2 other variables. Make up the variable names. | let total = price + tax; | let.*=.*\+.*; | |
Assign the sum of 2 numbers to a variable, which hasn't been declared beforehand. Make up the variable name and the numbers. | let total = 2 + 2; | let.*=[-]?(?:[.]\d+|\d+(?:[.]\d*)?)\+[-]?(?:[.]\d+|\d+(?:[.]\d*)?); | |
In one statement declare a variable. In a second statement assign it the sum of 2 numbers. Make up the variable name and the numbers. | let x; x = 2 + 2; |
let(.*);[\r\n]\1=[-]?(?:[.]\d+|\d+(?:[.]\d*)?)\+[-]?(?:[.]\d+|\d+(?:[.]\d*)?); | |
|
|||
|