diff -r 000000000000 -r 6474c204b198 js/src/jit-test/tests/for-of/array-holes-1.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/js/src/jit-test/tests/for-of/array-holes-1.js Wed Dec 31 06:09:35 2014 +0100 @@ -0,0 +1,10 @@ +// for-of does not skip Array holes. The value at a hole is undefined. + +var a = [0, , 2, 3]; +var log = []; +for (var x of a) { + assertEq(x, a[log.length]); + log.push(x); +} +assertEq(log[1], undefined); +assertEq(log.join(), "0,,2,3");