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