Closed benderTheCrime closed 4 years ago
Example:
// Create an "arguments"-like object here, but any Object will do. const obj = { 1: 'foo', 2: 'bar', }; const bar = obj[:2];
Should this be considered a syntax error?
It doesn't have a length, so its length would ToLength to 0, so bar should be [] - just like Array.prototype.slice.call(obj, 0, 2) would produce.
length
0
bar
[]
Array.prototype.slice.call(obj, 0, 2)
Example:
Should this be considered a syntax error?