blob: 8dc5b7337acfc6a563a41b611e10f6ceed855cc1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
// Array.of makes real arrays.
function check(a) {
assertEq(Object.getPrototypeOf(a), Array.prototype);
assertEq(Array.isArray(a), true);
a[9] = 9;
assertEq(a.length, 10);
}
check(Array.of());
check(Array.of(0));
check(Array.of(0, 1, 2));
var f = Array.of;
check(f());
|