103k views
4 votes
A foreach statement can be used in place of the for statement whenever code looping through an array requires "access" to the counter. True or False?

User Mr Asker
by
6.1k points

1 Answer

0 votes

Answer:

False

Step-by-step explanation:

Foreach is useful when we want to do something for each element rather than repeating something for n times

Answer is False

User Brandon Yates
by
5.2k points