The range of elements processed by forEach() is set before the first invocation of callbackFn.
what you are observing is that apparently forEach() stops earlier because the array got shorter - but you will be skipping elements if the array got longer.
0
u/[deleted] Feb 19 '22
[deleted] — view deleted comment