JavaScript Array/String Methods
Filter()
The filter() method returns a new array with all elements that pass the test defined by the given function.
Map()
The map() method creates a new array with the results of calling a function for every array element.
Reduce()
The reduce() method executes a reducer function on each element of the array and returns a single output value.
forEach()
The forEach() method executes a provided function for each array element.
Pop()
The pop() method removes the last element from an array and returns that element.
Push()
The push() method adds zero or more elements to the end of the array.
Shift()
The shift() method removes the first element from an array and returns that element.
Unshift()
The unshift() method adds one or more elements to the beginning of an array and returns the new length of the array.
Concat()
The concat() method returns a new array by merging two or more values/arrays.
Sort()
The sort() method sorts the items of an array in a specific order (ascending or descending).
Splice()
The splice() method modifies an array (adds, removes or replaces elements).
Slice()
The slice() method returns a shallow copy of a portion of an array into a new array object.
Split()
The split() method divides a string into substrings and returns them as an array without modifying the original string.
Reverse()
The reverse() method returns the array in reverse order. The method changes the original array.
Join()
join() combines all array elements into a single string with a specified separator, without changing the original array.
Includes()
The includes() method checks if an array contains a specified element or not.
IndexOf()
indexOf() compares searchElement to elements of the Array using strict equality (similar to triple-equals operator or ===).
Find()
The find() method returns the value of the first array element that satisfies the provided test function.
Every()
The every() method checks if all array elements pass a given test function without modifying the original array.
Some()
The some() method tests whether any of the array elements pass the given test function. Change the original array
Fill()
The fill() method returns an array by filling all elements with a specified value. fill() is a mutator method.