Inspectopedia
 
2024.3

Iterated elements are not used in forEach

Info
New
Last modified: 03 December 2024

Reports forEach loops that do not use iterable values.

Example:

The quick fix introduces anonymous parameter in the forEach section: