Some X array utility functions in JS
const array = [1,2,3,4,5];
Array Basic operations
1. Find the first item in the array
console.log(array[0]);
1
2. Find the last item in the array
console.log(array[array.length - 1]);
5
3. Addition of array values
console.log(array.reduce((previo...
vkglobal.hashnode.dev2 min read