Modify the original array directly
push() | Adds one or more elements to the end of the array and returns the new length |
pop() | Remove and return the last element of the array |
shift() | removes and returns the first element in the array |
unshift() | Adds one or more elements to the beginning of the array and returns the new length |
splice() | Add/remove items from an array and return the removed item arrayObject.splice(index,howmany,item1,…,itemX) index is required. An integer specifying where to add/remove items, use a negative number to specify a position from the end of the array. |
sort() | Used to sort the elements of an array, returning an array in ascending order |
reverse() | Used to reverse the order of elements in an array and return an array in reverse order |
Will not replace the original array, but will generate a new array
filter() |
Creates a new array whose elements are checked by checking all elements in the specified array that meet the criteria |
concat() |
Used to concatenate two or more arrays. Does not change the existing array, but just returns a copy of the concatenated array |
slice() |
Used to extract elements from the array, encapsulate the intercepted elements into a new array and return [start, end) Parameters: |