UNPKG

es-toolkit

Version:

A state-of-the-art, high-performance JavaScript utility library with a small bundle size and strong type annotations.

9 lines (7 loc) 188 B
function forEachRight(arr, callback) { for (let i = arr.length - 1; i >= 0; i--) { const element = arr[i]; callback(element, i, arr); } } export { forEachRight };