Javascript array methods made easy (Part I)

Today I’m going to look at 5 of the most used/useful javascript array methods. So, let’s get started.

map( )

This executes given function on every element of the array and return a new array.

filter( )

This method creates and returns a new array with the elements which satisfies the condition in the given function.



This array method considered as an accumulator function. This returns a single value.


some( )

This method can be used to check if any item (even a single one) of the array satisfies the given condition.


every( )

This is quite same as some() except this method evaluates all the elements in the given array.


Useful Links