3 ms·
Even without that argument, the behaviour is still consistent with other cases for arrays in JS anyway. > const a = [1, 2]; > a[0] 1 > a[2]
by Silhouette 6y ago
Even without that argument, the behaviour is still consistent with other cases for arrays in JS anyway.
> const a = [1, 2];
> a[0]
1
> a[2]
undefined
> a[-1]
undefined