* 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)
| 434 | * Useful if the array is being modified as it is being iterated. |
| 435 | */ |
| 436 | function reverseForEach<T>(items: T[] | readonly T[], callback: (current: T) => void) { |
| 437 | let i = items.length; |
| 438 | |
| 439 | while (i--) { |
| 440 | callback(items[i]); |
| 441 | } |
| 442 | } |
no test coverage detected