js-util

Home > rc-js-util > arrayForEach

arrayForEach() function

Like Array.forEach.

Signature:

export declare function arrayForEach<TItem>(items: ArrayLike<TItem>, callback: (item: TItem, index: number) => void): void;

Parameters

Parameter Type Description
items ArrayLike<TItem>  
callback (item: TItem, index: number) => void  

Returns:

void

Remarks

Has more consistent performance characteristics cross platform than the built in Array.forEach.

See arrayForEach().