The push() method is generally used to push an array to the end of an existing one. In ES5 specification, this is often done as follows:
If your browser supports ES6, you can use the spread operator:
The push() method can take more than one parameters, so you can use the apply() method for passing the array of values to be pushed as a list of function parameters:
Beware of using the concat() method which returns a new array instead of changing the existing array containing the values of the merged arrays. However, it is also technically right for this particular situation.