Function |
Example |
Description |
push |
myArray.push("new value"); |
Adds a value to the end of an Array. |
pop |
myArray.pop(); |
Removes the last value of an array and returns
it. |
unishift |
myArray.unshift("some value"); |
Adds a value to the beginning of an array. |
shift |
myArray.shift("some value"); |
Removes the first value in an Array and returns
it. |
indexOf |
myAray.indexOf("value"); |
Returns the location of an item, or -1 if it is
not found. |
sort |
myArray.sort(); |
Sorts an array. |