push
push method adds one or more element at the end of an array
pop
pop is removed the last element of the array & return that element
shift
A shift method removes the first element from the array and all other element indexes decrease by 1
unshift
unshift method adds a new element at the beginning of an array and all other element indexes increase by 1
concat
concat method concat two or more array and return a new array
reverse
reverse method reverses and returns the array
slice
A slice method return portion of an array as a new array without touching the existing array it's accepted 2 optional arguments start index & end index
splice
splice method uses to add or remove an element from an array. It's accepted 3 argument start index, delete count & new elements, it's return deleted elements.
find
find method return a 1st element that match with given test
filter
filter method returns an element that matches with given test
some
*some method returns true or false if one of the array element is pass in test condition *
every
every method checks whether all elements in an array pass the applied test and return true if pass else false
map
map method creates a new array with result to apply given function to each element
sort
sort method short array in alphabetical order. it's sort array values as strings
reduce
reduce method reduces the array to a single value from left to right
Wrapping up!
Share this blog with your friends π©πΌβπ€βπ§πΌ and developers π¨βπ» you know and let them know these
Your feedback and comments are very important to me. π
Top comments (0)