for loop forEach loop
Generic type of loop and can be used in a variety of scenarios. Mostly applied on arrays, maps, and sets.
Useful for quickly iterating the collection of items. Useful for iterating the subset of items.
The syntax is easier and quicker. The format of syntax is a little complex.
Does not provide a facility for modification during iteration. User modifies the items as per requirements.
The user can utilize the break statement to break. It cannot provide a facility to break the statement because of the callback method.