Array class
Array concat(otherArray)
- Concatenates the array with the specified array. Multiple arrays can be specified.
number Length
- Tells the lenght of an array
string join(separator)
- Joins all of the elements in the array to form a string. The argument specifies the character used to delimit the items.
object pop()
- Treats an array like a stack, and removes and returns the last item in the array.
void push(item)
- Treats an array like a stack, and appends the specified item to the array.
boolean isArray(value)
- Tells if the value is an array
Array reverse()
- Reverses the order of the items in the array in place.
object shift()
- Like pop, but operates on the first element in the array.
splice()
- inserts items into the middle of an array.
Array slice(start,end)
- Returns a sub-array.
Array sort()
- Sorts the items in the array in place.
void unshift(item)
- Like push, but inserts the new element at the start of the array.
String toString
- returns the string representation of an array
String toLocaleString()
- returns the string representation of an array in locale
object valueOf
- toString() and valueOf() methods return the same value when called on an array.
number indexOf
- Returns the index of an item
number lastIndexOf
- Returns the index of an item from the end of the array
boolean every()
- Returns true if all item meets the passed in function
boolean some()
- Returns true if some item meets the passed in function
Array filter()
- Filter the items in an array by passed in function
Array map()
- Maps the items in the array by the passed function
void forEach()
- Run each item against the passed function
object reduce()
- Reduce the array to a value
object reduceRight()
- Reduce the array to a value from right