232k views
2 votes
What is forEach loop with example?

User Bold Bat
by
6.6k points

1 Answer

2 votes
In computer programming, foreach loop (or for each loop) is a control flow statement for traversing items in a collection. foreach is usually used in place of a standard for loop statement.
User Ericsoco
by
7.1k points