Sign in
cobalt
/
cobalt
/
c73ce7d5dfce7ae20bcc30efc5f220e0fbac12b1
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
for-of
/
arrays-growing-2.js
blob: e9867714ce9d6b76017056c1d92bc186894cc544 [
file
] [
log
] [
blame
]
// Inserting values in an array does not change the next index of an existing iterator.
var
a
=
[
1
,
2
,
3
,
4
];
var
s
=
''
;
for
(
var
v of a
)
{
s
+=
v
;
if
(
s
.
length
===
2
)
a
.
unshift
(
'x'
);
}
assertEq
(
s
,
'12234'
);