Test name | Executions per second |
---|---|
slice | 15967863.0 Ops/sec |
spread operator | 15219452.0 Ops/sec |
concat into empty array | 14990695.0 Ops/sec |
var myArray = [ "hello", true, 7 ]
var other = myArray.slice();
var other = [ myArray ]
[].concat(myArray);