Advertisement
728x90
javascript
1const [x, ...y, z] = [1, 2, 3, 4];
2
3console.log(x, y, z);Choose the correct output:
A
1, [2, 3], 4B
1, [2, 3, 4], undefinedC
1, [2], 3D
SyntaxErrorAdvertisement
Responsive Ad
34of86
Advertisement
1const [x, ...y, z] = [1, 2, 3, 4];
2
3console.log(x, y, z);Advertisement