Transforms each element and its zero-based index into a new value.
Type of elements within the source iterable.
Result type produced by selector.
The source iterable.
Projection invoked for each element together with its index.
A deferred sequence containing the values produced by selector.
Enumeration is deferred. The index argument increments sequentially starting at zero.
const numbers = [1, 2, 3, 4, 5];const squares = select(numbers, x => x * x).toArray();console.log(squares); // [1, 4, 9, 16, 25] Copy
const numbers = [1, 2, 3, 4, 5];const squares = select(numbers, x => x * x).toArray();console.log(squares); // [1, 4, 9, 16, 25]
Transforms each element and its zero-based index into a new value.