Push multiple elements to array

You can push multiple elements into an array in the following way

var a = [];
    
a.push(1, 2, 3);

console.log(a);

Leave a Comment