Sign in
cobalt
/
cobalt
/
71840339e1109efe930df5c60712d91cdcc962a8
/
.
/
src
/
third_party
/
mozjs-45
/
js
/
src
/
jit-test
/
tests
/
basic
/
testInitelemCond.js
blob: 2f83c12102395ed0cf1b6d707134d67fb4d96951 [
file
] [
log
] [
blame
]
/* Element initializers with unknown index. */
function
foo
(
i
)
{
var
x
=
[
1
,
2
,
i
==
1
?
3
:
4
,
5
,
6
];
var
y
=
""
+
x
;
if
(
i
==
1
)
assertEq
(
y
,
"1,2,3,5,6"
);
else
assertEq
(
y
,
"1,2,4,5,6"
);
}
for
(
var
i
=
0
;
i
<
10
;
i
++)
foo
(
i
);