Useful methods for Array manipulation

return value of array methods

Probably array is the most widely used data structure in javaScript. Basically array is an object. Array has some built in methods.
Let’s talk about them.

map: map is a higher order function that takes a function as an input. This function loop through all array element and can do
some operations with each element. this returns a new array with new elements.
Return: returns a new array.
Time complexity: As it loop through all the elements of the array, So it’s time complexity is BIG O(n)

Front End Web Developer