Run details:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36
Chrome 76
Mac OS X 10.14.6
Desktop
5 years ago
Test name Executions per second
Array.prototype.concat 15783.0 Ops/sec
spread operator 41593.8 Ops/sec
Push 11164103.0 Ops/sec
Script Preparation code:
AخA
 
function randomArray(length, max) {
    return Array.apply(null, Array(length)).map(function() {
        return Math.round(Math.random() * max);
    });
}
var arr = randomArray(10000, 15);
Tests:
  • Array.prototype.concat

     
    var other = arr.concat(1);
  • spread operator

     
    var other = [...arr, 1]
  • Push

     
    var other = arr.push(1);