Loops
/ API Reference
Loops
/ API Reference

arrayEach

Iterates over each value in the array.
Similar to Array.prototype.forEach.

The Gist

import { arrayEach } from '@weser/loops'

arrayEach([1, 2, 3], (value) => console.log(value))
// 1
// 2
// 3

Parameters

ParameterTypeDescription
arrArray<T>The array to iterate over.
iterator(value: T, index: number, length: number, arr: Array<T>) => voidThe iterator method with the signature.
On this page