Edit This Page

toArray()

Create a new Array from an Enumerable.

Returns

(Array): New Array created from an Enumerable.

Example

const array = Enumerable
                  .from([1, 2, 3])
                  .where(x => x < 3)
                  .toArray();
// array === [1, 2]

Aliases