Frequently used array methods in JavaScript
1) concat
concat method will merge arrays and return a new array.
example
const arr1 = [1,2,3]
const arr2 = [a,b,c]
const ans = arr1.concat(arr2)
console.log(ans) // [1,2,3,a,b,c]
concat will return a shallow copy of an existing array
concat can tak...
patelyash.hashnode.dev2 min read