Converts all elements of an Iterable to an Array.
Convert Iterable to Array
const iterable = [1, 2, 3];const array = toArray(iterable);console.log(array); // [1, 2, 3]
an Array consisting of all elements
the Iterable value type
the Iterable to convert
Generated using TypeDoc
Converts all elements of an Iterable to an Array.
Example
Convert Iterable to Array
Returns
an Array consisting of all elements