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