Test name | Executions per second |
---|---|
Array.prototype.concat | 2758906.8 Ops/sec |
spread operator | 2458994.5 Ops/sec |
jQuery merge | 865095.6 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);