blob: 7237b0b36c5563aba41ab7e288a88dd7d97c258c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
for (var i = 0; i < 9; i++)
assertEq(!Symbol(), false, "symbols are truthy");
var a = [0, 0, 0, 0, 0, Symbol(), Symbol()];
var b = [];
function f(i, v) {
b[i] = !v;
}
for (var i = 0; i < a.length; i++)
f(i, a[i]);
assertEq(b[b.length - 3], true);
assertEq(b[b.length - 2], false);
assertEq(b[b.length - 1], false);
|