javascript array concat in place code example
Example 1: concatenate javascript array
const fruits = ['apple', 'orange', 'banana'];
const joinedFruits = fruits.join();
console.log(joinedFruits); // apple,orange,banana
Example 2: javascript concat two arrays
//ES6
const array3 = [...array1, ...array2];