js array push multiple code example
Example 1: js array push
const arr = ["foo", "bar"];
arr.push('baz'); // 3
arr; // ["foo", "bar", "baz"]
Example 2: javascript add multiple items to array
var a = [];
a.push(1, 2, 3);
console.log(a);
const arr = ["foo", "bar"];
arr.push('baz'); // 3
arr; // ["foo", "bar", "baz"]
var a = [];
a.push(1, 2, 3);
console.log(a);