method ReadonlyArray.forEach
Private
ReadonlyArray.forEach(
callbackfn: (
value: T,
index: number,
array: readonly T[],
) => void
,
thisArg?: any,
): void

Performs the specified action for each element in an array.

Parameters

callbackfn: (
value: T,
index: number,
array: readonly T[],
) => void

A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.

optional
thisArg: any

An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.

Return Type

void