zaagan
6/29/2019 - 8:28 AM

Array Methods

Array Methods

concat() /* - Join several arrays into one */

indexOf() /* - Returns the first position at which
a given element appears in an array */

join() /* - Combine elements of an array into 
a single string and return the string */

lastIndexOf() /* - Gives the last position at which 
a given element appears in an array */

pop() /* - Removes the last element of an array */

push() /* - Add a new element at the end */

reverse() /* - Sort elements in a descending order */

shift() /* Remove the first element of an array */

slice() /* - Pulls a copy of a portion of 
an array into a new array */

sort() /* - Sorts elements alphabetically */

splice() /* - Adds elements in a specified
         way and position */

toString() /* - Converts elements to strings */

unshift() /* - Adds a new element to the beginning */

valueOf() /* Returns the primitive value 
of the specified object */