Adds
Elements to add to the array.
Specifies the index where to insert/add
Array<T>
Array containing the added
Array<T>
boolean
boolean
Gets the element(s) at a given index.
Element's index to retrieve.
Continue counting if the index overshoots the Array.length
T in Array<T>
The element at
Start index.
Array<T>
Elements between
Averages all values in the array.
Maps each element to a number.
number
The average of the entire array.
Clones the array.
Array<T>
Cloned array.
Removes all instances of %undefined%, %null%, and %NaN% from the array.
Remove false elements, default = false.
Array<T>
The same array with the special values removed.
Counts all elements in the array that match
object to match against in the array.
number
Number of elements in the array that match
Runs
Callback function for applied to each element in the array.
Starting index, default = 0.
Continue from the beginning if the end of the array is reached, default = false.
Array<T>
Original array.
Returns true if all elements in the array match
Match all elements to this.
object.
boolean
Boolean
Removes any element in the array that matches [f1], [f2], etc.
Elements to find in the array and remove.
Array<T>
A copy of the original array with all instances of
Array<T>
Returns any elements in the array that match
Find these elements in the array.
%this% object while filtering.
Array<T>
Array containing th items
Returns the first element that matches
Elements to match against.
Index to start searching from, default = 0.
Loop around the end of the array, default = false.
T in Array<T>
First element matching
T in Array<T>
Returns all elements that match
Element to match against.
Index to start searching from, default = 0.
Loop around the end of the array, default = false.
Array<T>
Elements matching
Array<T>
Returns the index of the first element that matches
Element to match against.
Index to start searching from, default = 0.
Loop around the end of th array, default = false.
number
Index at which
number
Returns the first element(s) in the array.
T in Array<T>
Array<T>
Returns a flattened, one-dimensional copy of the array.
Limit the flattening to this depth, default = Infinity.
Array<T>
Flattened array.
Returns a slice of the array from
Index to start the slice from.
Array<T>
Subarray starting from [index] to the end of the original array.
Groups the array by
Property on the elements in the array.
Optional callback for each group, default = No callback.
{ [key: string]: T; }
Callback function for each element, returns the key for the group the element should be in.
{ [key: string]: T[]; }
Adds
Element to add to the array.
, default = Array.length.
Array<T>
Array with
Elements to include into the array at [index].
Array<T>
Array<T>
Array<T>
Returns an array containing the elements all arrays have in common.
Elements to intersect with.
Array<T>
An array containing the intersecting elements.
Returns true if the array is empty.
boolean
True if the array is empty, otherwise false.
Returns the last element(s) in the array.
T in Array<T>
The last element in the array, if [num] is present then it returns an array of the last [num] elements.
The number of elements to return.
Array<T>
Searches the array and returns the last index where
The element to search for.
Start the search from this index, default = Array.length.
number
The last index of
Returns the elements in the array with the least commonly occuring value.
Property on elements in the array.
Array<T>
Array
Callback to retrieve the 'least' property to compare elements against.
Array<T>
Maps the array to another array containing the values that are the result of calling
Property on each element in the array or callback function.
This pointer in
Array<U>
Mapped array.
Callback function to map each element in the array.
Array<U>
Returns the element in the array with the greatest value.
Property on each element in the array or callback function.
T in Array<T>
Maximum element in the array.
Array<T>
All max values in the array.
Callback function to determine the max value of each element in the array.
T in Array<T>
Array<T>
Returns the element in the array with the lowest value.
Property on each element in the array or callback.
T in Array<T>
Minimum element in the array.
Array<T>
Callback function to determine the min value of each element in the array.
T in Array<T>
Array<T>
Returns the elements in the array with the most commonly occuring value.
Property on each element in the array or
Array<T>
Array of elements that have the most common property.
Callback function to determine the element that contains the most commonly occuring value.
Array<T>
Returns true if none of the elements in the array match
Value to see if it exists in the array.
boolean
True if none of the values match
Callback function to determine if none of the elements in the array contain a certain value.
boolean
Returns a copy of the array with the elements randomized.
Array<T>
Copy of the array with the elements in a random order.
Reduces the array to a single result.
Reduce function callback.
First argument to the callback if present.
T in Array<T>
Reduced value of the entire array.
Identical to %Array#reduce%, but operates on the elements in reverse order.
Reduce function callback.
First argument to the callback if present.
T in Array<T>
Reduced right value of the entire array.
Removes any element in the array that matches [f1], [f2], etc.
Elements that should be removed from the array.
Array<T>
The array with
Callback function to check if elements should be removed.
Array<T>
Removes element at
Starting index.
Stop index, default = Array.length.
Array<T>
Subarray with elements
Returns a random element from the array.
T in Array<T>
Single random element in the array.
Grab this many random elements in the array.
Array<T>
Returns true if any element in the array matches
Element to match or callback function.
this object in the callback.
boolean
Returns true if any element in the array matchs
boolean
Sorts the array by
Property on each element in the array or map callback function.
True to sort the array in descending order, default = false.
Array<T>
Sorted array.
Array<T>
Subtracts from the array all elements in [a1], [a2], etc.
Elements to remove from the array.
Array<T>
Array with
Array<T>
Sums all values in the array.
Property on each element in the array or callback function to sum up the elements.
number
The sum of all elements in the array.
number
Returns a slice of the array up to
Slick the array up to this index.
Array<any>
Slice of the array from 0 to
Returns an array containing all elements in all arrays with duplicates removed.
Array<T>
Union between the original array and
Elements to create a union with.
Array<T>
Union between the original array and
Removes all duplicate elements in the array.
Property on each element in the array or callback function to pick a property on the element.
Array<T>
Array with only unique elements.
Callback to pluck the property to check for uniqueness.
Array<T>