How do you combine two or more arrays

Posted by Andre Scott | Updated on

The concat() method is used to join two or more arrays by returning a new array containing all the elements. The syntax would be as below:

Let’s take an example of array’s concatenation with veggies and fruits arrays,


If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.

Related Questions & Answers