- Published on
push append element to the end of an array.
pop extract the last element of an array and return that element.
shift extract the first element of an array and return that element.
unshift append an element to the beginning of an array.
The concat method is used to create new array by merging two or more arrays.
The slice method is used to create new array using selected element from an array without changing the contents of that array.
The splice method is used to delete, replace or insert a new element to an array. It changes the contents of existing array.
The reverse method reverse element of an array.
The join method is used to concat all the elements of an array separated by commas or any specific separator string.
The every method tests whether all element of an array pass the test implemented by a callback function and return boolean value.
The forEach accepts a callback function and executes the callback function once for each of the element of an array.
The map accepts a callback function and executes the callback function and return a new array.
The filter accepts a callback function and creates a new array with all elements that pass the test implemented by that function.
The find accepts a callback function and returns the value of the first element which pass the test implemented by that function.
The reduce method applies a callback function simultaneously against two values from left to right of an array and reduce it to a single value.
The sort method allows to sort elements of an array in place. The default sorting order is ascending
Also published in medium