UNPKG

rc-js-util

Version:

A collection of TS and C++ utilities to help writing performant and correct applications, achieved through strict typing and (removable) invariant checking.

92 lines (43 loc) 1.23 kB
<!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [rc-js-util](./rc-js-util.md) &gt; [arrayForEachRange](./rc-js-util.arrayforeachrange.md) ## arrayForEachRange() function Like [arrayForEach()](./rc-js-util.arrayforeach.md) with integer range as input. **Signature:** ```typescript export declare function arrayForEachRange(from: number, to: number, callback: (value: number, index: number) => void): void; ``` ## Parameters <table><thead><tr><th> Parameter </th><th> Type </th><th> Description </th></tr></thead> <tbody><tr><td> from </td><td> number </td><td> The value to start from (inclusive). </td></tr> <tr><td> to </td><td> number </td><td> The value to finish with (inclusive). </td></tr> <tr><td> callback </td><td> (value: number, index: number) =&gt; void </td><td> Called for each value in the range. </td></tr> </tbody></table> **Returns:** void ## Remarks Where `from` and `to` are equal a length 1 array is returned, NaN input is not supported. See [arrayForEachRange()](./rc-js-util.arrayforeachrange.md)<!-- -->.