* Execute a callback for each entry in the collection
(
callbackfn: (value: TOutput, key: TKey, index: number) => void,
)
| 441 | * Execute a callback for each entry in the collection |
| 442 | */ |
| 443 | public forEach( |
| 444 | callbackfn: (value: TOutput, key: TKey, index: number) => void, |
| 445 | ): void { |
| 446 | let index = 0 |
| 447 | for (const [key, value] of this.entries()) { |
| 448 | callbackfn(value, key, index++) |
| 449 | } |
| 450 | } |
| 451 | |
| 452 | /** |
| 453 | * Create a new array with the results of calling a function for each entry in the collection |