each
each() function
Iterates over Iterable/AsyncIterable, applying each in turn to f
.
Signature:
declare function each<A, B = unknown>(f: (a: A) => B, iterable: Iterable<A>): void;
Returns:
void
Example
each(console.log, [1, 2, 3]); // log 1, 2, 3