concat to arrays js code example
Example 1: concatenate javascript array
const fruits = ['apple', 'orange', 'banana'];
const joinedFruits = fruits.join();
console.log(joinedFruits); // apple,orange,banana
Example 2: js combine arrays
const array1 = ["Vijendra","Singh"];
const array2 = ["Singh", "Shakya"];
const array3 = [...array1, ...array2];