Method forir documentation

Executes the provided function on each element of the given array, going backward.

Example

```javascript let res = 0; bbn.fn.forir([4, 5, 5, 10, 1, 2], d => { res += d; }, 4, 2); // res = 16 ```

Example

```javascript let res = 0; bbn.fn.forir([4, 5, 5, 10, 1, 2], d => { if (res >= 20) { return false; } res += d; }); // res = 23 ```

Executes the provided function on each element of the given array, going backward. - A maximum and a minimum value can be provided, within the boundaries of the array's indexes. Returning false will stop the loop. BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.