js instantiate array with concat code example
Example 1: es6 concat array
let fruits = ["apples", "bananas"];
let vegetables = ["corn", "carrots"];
let produce = [...fruits, ...vegetables];
//["apples","bananas","corn","carrots"]
Example 2: array concat in javascript
const letters = ['a', 'b', 'c'];
const numbers = [1, 2, 3];
const newArray = letters.concat(numbers);
// newArrat is ['a', 'b', 'c', 1, 2, 3]