blob: 9b4d087bde5cf94b07c00d31262a123280a84067 (
plain)
1
2
3
4
5
6
7
8
|
// for-of consults Array.prototype when it encounters a hole.
Array.prototype[1] = 'peek';
var log = [];
for (var x of [0, , 2, 3])
log.push(x);
assertEq(log[1], 'peek');
assertEq(log.join(), "0,peek,2,3");
|