3 ms·
Because you can create that array anyway, like so: var arr = []; arr[0] = 1; arr[1] = 2; arr[3] = 3; so there's not really much downside to also allow
by bzbarsky 7y ago
Because you can create that array anyway, like so:
var arr = [];
arr[0] = 1;
arr[1] = 2;
arr[3] = 3;
so there's not really much downside to also allowing a literal syntax for the same thing.