Test name | Executions per second |
---|---|
Array.prototype.concat | 6494781.5 Ops/sec |
spread operator | 21639738.0 Ops/sec |
var params = [ "hello", {one: 'two'} , 4, 3, 2, ['one', 'two', 'three'] ];
var other = [ 1, 2 ].concat(params);
var params = [ "hello", {one: 'two'} , 4, 3, 2, ['one', 'two', 'three'] ];
var other = [ 1, 2, params ]