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 array name is minerals. Complete the destructuring statement. | const [a, b, c] _______; | = minerals | =minerals |
The variables are first and second. Complete the destructuring statement. | let ___________ = players;] | [first, second] | \[first,second\] |
Use destructuring to assign the elements of numArray to the variables a, b, and c. | let [a, b, c] = numArray; | let\[a,b,c\]=numArray; | |
Assign the three elements of an array to variables using destructuring. Make up everything. | let [a, b, c] = cities; | let\[[a-z_$][a-zA-Z0-9_$]*,[a-z_$][a-zA-Z0-9_$]*,[a-z_$][a-zA-Z0-9_$]*\]=[a-z_$][a-zA-Z0-9_$]*; | |
Assign the first and third elements of an array to variables. Make up everything. | let [a, , c] = cities; | let\[[a-z_$][a-zA-Z0-9_$]*,,[a-z_$][a-zA-Z0-9_$]*\]=[a-z_$][a-zA-Z0-9_$]*; | |
The object, corp, has only one property, size. Fill in the blank to assign the property to a variable. | let { _______ } = corp; |
size | size |
Convert this statement to a destructuring statement. | const pop = province.population; | let { population } = province; |
let{[\r\n]population[\r\n]}=province; |
Code a complete restructuring statement for an object with two properties. Make up everything. | let { population, area } = nationIN; |
let{[\r\n][a-z_$][a-zA-Z0-9_$]*,[\r\n][a-z_$][a-zA-Z0-9_$]*[\r\n]}=[a-z_$][a-zA-Z0-9_$]*; | |
|
|||
|