javascript push all elements from array to another code example
Example 1: javascript array push
var SomeRandomArray = [];
SomeRandomArray.push("Hello, world!");
Example 2: js array push
const arr = ["foo", "bar"];
arr.push('baz'); // 3
arr; // ["foo", "bar", "baz"]
Example 3: javascript push all elements of array to another array
var arrayA = [1, 2];
var arrayB = [3, 4];
var newArray = arrayA.concat(arrayB);