Test name | Executions per second |
---|---|
Array.prototype.concat | 3608025.2 Ops/sec |
spread operator | 1975189.4 Ops/sec |
jQuery merge | 2774980.0 Ops/sec |
var params = [ "hello", true, 7 ];
var other = [ 1, 2 ].concat(params);
var params = [ "hello", true, 7 ]
var other = [ 1, 2, params ]
var params = [ "hello", true, 7 ];
var other = $.merge([1, 2], params);