MCPcopy Create free account
hub / github.com/angular/components / reverseForEach

Function reverseForEach

src/cdk/dialog/dialog.ts:436–442  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

434 * Useful if the array is being modified as it is being iterated.
435 */
436function 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}

Callers 2

closeAllMethod · 0.85
ngOnDestroyMethod · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected