var a = [0, 1, 2][0, 1, 2];
What is value of a?
var b = 0, 1, 2;
What is value of b?
b is last element of 0, 1, 2 so
b === 2
So a === [0, 1, 2][2];
a === 2;
A grammar utility of JavaScript. 😉
var a = [0, 1, 2][0, 1, 2];
What is value of a?
var b = 0, 1, 2;
What is value of b?
b is last element of 0, 1, 2 so
b === 2
So a === [0, 1, 2][2];
a === 2;
A grammar utility of JavaScript. 😉