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
Rewrite this using camelCase. | let Nameofband; | let nameOfBand; | letnameOfBand; |
Declare a variable, in camelCase, whose name combines the words top player followed by the only legal non-letter, non-number character that isn't the underline_. | let topPlayer$; | lettopPlayer\$; | |
Declare a three-character variable using a lowercase letter, an uppercase letter, and a number. Don't assign a value. Make up the letters and the number. | let aB1; | let[a-z][A-Z][0-9]; | |
In a single statement declare a legally-named variable and assign a number to it. Make up the variable name and the number. | let aNum = 40; | let[a-z_$][a-zA-Z0-9_$]*=[-]?(?:[.]\d+|\d+(?:[.]\d*)?); | |
In a single statement declare a legally-named variable and assign to it the sum of 2 other legally-named variables. | let newNum = num1 + num2; | let[a-z_$][a-zA-Z0-9_$]*=[a-z_$][a-zA-Z0-9_$]*\+[a-z_$][a-zA-Z0-9_$]* | |
Declare a variable that is a combination of your first and last names. Use camelCase. Don't assign a value. You can make up the names if you like. | let markMyers; | let[a-z]+[A-Z][a-z]*; | |
In a single statement declare a variable and assign it a number. | let num = 1.038; | let[a-z_$][a-zA-Z0-9_$]*=[-]?(?:[.]\d+|\d+(?:[.]\d*)?); | |
Code an alert using a variable inside the parentheses. | alert(greetingToWorld); | alert\([a-z_$][a-zA-Z0-9_$]*\); | |
|
|||
|