Sign in
cobalt
/
cobalt
/
308ed6b84664d59944cd65f4b4359c28a2443be6
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
for-of
/
arrays-shrinking-2.js
blob: 86c77303d017d1b65060f78e24e4f9c59b7d6e6b [
file
] [
log
] [
blame
]
// Using shift to cut values out of an array does not change the next index of an existing iterator.
var
a
=
[
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
];
var
s
=
''
;
for
(
var
v of a
)
{
s
+=
v
;
a
.
shift
();
}
assertEq
(
s
,
'1357'
);