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

Function reverseForEach

src/cdk/dialog/dialog.ts:426–432  ·  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

424 * Useful if the array is being modified as it is being iterated.
425 */
426function 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}

Callers 2

closeAllMethod · 0.85
ngOnDestroyMethod · 0.85

Calls 1

callbackFunction · 0.85

Tested by

no test coverage detected