michael@0: // for-of consults Array.prototype when it encounters a hole. michael@0: michael@0: Array.prototype[1] = 'peek'; michael@0: var log = []; michael@0: for (var x of [0, , 2, 3]) michael@0: log.push(x); michael@0: assertEq(log[1], 'peek'); michael@0: assertEq(log.join(), "0,peek,2,3");