The most used JavaScript array methods
2 min readNov 3, 2020

Whenever I try to make something using JavaScript, I have to use some of those methods. I am going to demonstrate the most used JS array methods.
- concat: Concat method marge two arrays and produce a new array. Remember it doesn't replace the existing arrays.
- every: Every method returns a boolean value. Either it will be true or false. Every method checks the conditions that all the values passed on the array match with the conditions.
- filter: Filter is the most used array method in JS. Filter methods take the arrays and return a new array after checking the conditions.
- find: Find returns the first element of the array which fulfill the condition. It returns a number.
- findIndex: FindIndex returns the first index of the array which fulfill the condition. It also returns a number.
- forEach: forEach return array values once for every elements. Note, It does not return values.
- indexOf: If you need to find an index of a value this method perfect for that.
- join: Join method return a string of all elements of the array. You can separate elements using space, comma, hyphens, etc.
- map: Map works the same as forEach but the only difference is map create a new array then show every element.
- lastaIndexOf: This method returns the last index number of the provided elements on the array. If it does not found it will return -1.
- pop: The pop method removes the last elements of that array and returns it.
- push: The push method adds a new element to the array and returns the new length.
- reduce: reduce the return of a new output of array and provided function results.
- sort: sort method returns the sorted array. we can sort ascending or descending. the default sort is ascending. First, it converts elements into a string than compare it to UTF-16 code unit values.
If you came this far that's mean you read the whole post. Thank you.