Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review: https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Array.of passes the number of arguments to the constructor it calls.
2
3 var hits = 0;
4 function Herd(n) {
5 assertEq(arguments.length, 1);
6 assertEq(n, 5);
7 hits++;
8 }
9 Herd.of = Array.of;
10 Herd.of("sheep", "cattle", "elephants", "whales", "seals");
11 assertEq(hits, 1);