Create
Learn
Share

JS Array Methods

rename
tudasape's version from 2017-11-08 04:54

Section

Question Answer
Joins two or more arrays, and returns a copy of the joined arraysconcat()
Search the array for an element and returns its positionindexOf()
Joins all elements of an array into a stringjoin()
Search the array for an element, starting at the end, and returns its positionlastIndexOf()
Removes the last element of an array, and returns that elementpop()
Adds new elements to the end of an array, and returns the new lengthpush()
Reverses the order of the elements in an arrayreverse()
Removes the first element of an array, and returns that elementshift()
Selects a part of an array, and returns the new arrayslice()
Sorts the elements of an arraysort()
Adds/Removes elements from an arraysplice()
Converts an array to a string, and returns the resulttoString()
Adds new elements to the beginning of an array, and returns the new lengthunshift()
Returns the primitive value of an arrayvalueOf()
memorize