Returns an iterator over all numeric keys from 0 to length - 1.
0
length - 1
This uses Array.prototype.keys() when available and falls back to polyArrKeys. Unlike arrIndexKeys, this always iterates all index positions, including holes.
Array.prototype.keys()
The array-like value to get key iterator for.
An iterable iterator of numeric index keys.
0.14.0
arrFrom(arrKeys(["a", "b", "c"]));// [0, 1, 2]const sparse: any[] = [];sparse[2] = "c";arrFrom(arrKeys(sparse));// [0, 1, 2] Copy
arrFrom(arrKeys(["a", "b", "c"]));// [0, 1, 2]const sparse: any[] = [];sparse[2] = "c";arrFrom(arrKeys(sparse));// [0, 1, 2]
Returns an iterator over all numeric keys from
0tolength - 1.This uses
Array.prototype.keys()when available and falls back to polyArrKeys. Unlike arrIndexKeys, this always iterates all index positions, including holes.