summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/for-of/arrays-slow-5.js
blob: 36173e352bf2ad64b6193f7e0d105add17b5c870 (plain)
1
2
3
4
5
6
7
8
9
10
// Slowifying an array while it is being iterated does not affect iteration.

var a = [9, 8, 7, 6, 5, 4, 3];
var log = '';
for (var x of a) {
    log += x;
    if (x === 6)
        a.slow = true;
}
assertEq(log, "9876543");