Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
for-of
/
array-holes-1.js
blob: 3d8612219263d6926dd754829fbf95e708c43fb6 [
file
] [
log
] [
blame
]
// 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"
);