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 preferred way to define an object is the __________ method. | object literal | objectliteral | |
A property named "plant location" must be defined using (one word) ______ notation. | bracket | bracket | |
Rewrite this using the alternative method. | const caninePet = {}; | const caninePet = new Object(); | constcaninePet=newObject\(\); |
Rewrite this using the alternative notation. | caninePet.name = "Elvis"; | caninePet["name"] = "Elvis"; | caninePet\[•name•\]=•Elvis•; |
Declare an object using the alternative to the object literal method. Make up the object identifier. | const planet9 = new Object; | const[a-z_$][a-zA-Z0-9_$]*=newObject; | |
Define an integer property using bracket notation. Make up everything. | let planet9["oxygen level"] = 0; | let[a-z_$][a-zA-Z0-9_$]*\[•.*•\]=(0|-?[1-9][\d]*); | |
Declare an empty object using the alternative to the object literal method. Then define an integer property of the object using bracket notation. Make up everything. | const planet9 = new Object(); planet9["oxygen level"] = 0; |
const([a-z_$][a-zA-Z0-9_$]*)=newObject\(\);[\r\n]\1\[•.*•\]=(0|-?[1-9][\d]*); | |
Assign a string property to a variable. Then use the variable to define a property. Make up everything. | let property44 = "oxygen level"; planet9[property44] = "none"; |
let([a-z_$][a-zA-Z0-9_$]*)=•.*•;[\r\n][a-z_$][a-zA-Z0-9_$]*\[\1\]=•.*•; | |
|
|||
|