rest-parameters-produce-an-array.js (427B)
1 // Copyright (C) 2014 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 14.1 5 description: > 6 Rest parameter produces an instance of Array 7 ---*/ 8 function af(...a) { 9 assert.sameValue(a.constructor, Array, "The value of `a.constructor` is `Array`"); 10 assert(Array.isArray(a), "`Array.isArray(a)` returns `true`"); 11 } 12 af(1); 13 14 reportCompare(0, 0);