* Executes a callback against all elements in an array while iterating in reverse. * Useful if the array is being modified as it is being iterated.
(items: T[] | readonly T[], callback: (current: T) => void)
| 424 | * Useful if the array is being modified as it is being iterated. |
| 425 | */ |
| 426 | function reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) { |
| 427 | let i = items.length; |
| 428 | |
| 429 | while (i--) { |
| 430 | callback(items[i]); |
| 431 | } |
| 432 | } |
no test coverage detected