michael@0: // for-of does not skip Array holes. The value at a hole is undefined. michael@0: michael@0: var a = [0, , 2, 3]; michael@0: var log = []; michael@0: for (var x of a) { michael@0: assertEq(x, a[log.length]); michael@0: log.push(x); michael@0: } michael@0: assertEq(log[1], undefined); michael@0: assertEq(log.join(), "0,,2,3");