T in Array<T>
string
string
Array<any>
any
string
Gets or sets the length of the array. This is a number one higher than the highest element defined in an array.
Returns the first non-null element in the current selection. If the selection is empty, returns null.
(data: any, index: number) => any
Re-inserts elements into the document such that the document order matches the selection order. This is equivalent to calling sort() if the data is already sorted, but much faster.
Select an element from the current document
Selects the first element that matches the specified selector string
Selects the specified node
Select multiple elements from the current document
Selects all elements that match the specified selector
Selects the specified array of elements
string
string
Combines two or more arrays.
Additional items to add to the end of array1.
Array<T>
Combines two or more arrays.
Additional items to add to the end of array1.
Array<T>
Determines whether all the members of an array satisfy the specified test.
A function that accepts up to three arguments. The every method calls the callbackfn function for each element in array1 until the callbackfn returns false, or until the end of the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
boolean
Performs the specified action for each element in an array.
A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Returns the index of the first occurrence of a value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at index 0.
number
Adds all the elements of an array separated by the specified separator string.
A string used to separate one element of an array from the next in the resulting String. If omitted, the array elements are separated with a comma.
string
Returns the index of the last occurrence of a specified value in an array.
The value to locate in the array.
The array index at which to begin the search. If fromIndex is omitted, the search starts at the last index in the array.
number
Calls a defined callback function on each element of an array, and returns an array that contains the results.
A function that accepts up to three arguments. The map method calls the callbackfn function one time for each element in the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
Array<U>
Removes the last element from an array and returns it.
T in Array<T>
Appends new elements to an array, and returns the new length of the array.
New elements of the Array.
number
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
T in Array<T>
Calls the specified callback function for all the elements in an array. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduce method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
U
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
T in Array<T>
Calls the specified callback function for all the elements in an array, in descending order. The return value of the callback function is the accumulated result, and is provided as an argument in the next call to the callback function.
A function that accepts up to four arguments. The reduceRight method calls the callbackfn function one time for each element in the array.
If initialValue is specified, it is used as the initial value to start the accumulation. The first call to the callbackfn function provides this value as an argument instead of an array value.
U
Reverses the elements in an Array.
Array<T>
Removes the first element from an array and returns it.
T in Array<T>
Returns the total number of elements in the current selection.
number
Returns a section of an array.
The beginning of the specified portion of the array.
The end of the specified portion of the array.
Array<T>
Determines whether the specified callback function returns true for any element of an array.
A function that accepts up to three arguments. The some method calls the callbackfn function for each element in array1 until the callbackfn returns true, or until the end of the array.
An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
boolean
Sorts the elements in the current selection according to the specified comparator function.
a comparison function, which will be passed two data elements a and b to compare, and should return either a negative, positive, or zero value to indicate their relative order.
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
Array<T>
Removes elements from an array and, if necessary, inserts new elements in their place, returning the deleted elements.
The zero-based location in the array from which to start removing elements.
The number of elements to remove.
Elements to insert into the array in place of the deleted elements.
Array<T>
string
Returns a string representation of an array.
string
Starts a transition for the current selection. Transitions behave much like selections, except operators animate smoothly over time rather than applying instantaneously.
Inserts new elements at the start of an array.
Elements to insert at the start of the Array.
number