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