asked 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?

asked
User Mr Asker
by
8.4k 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

answered
User Brandon Yates
by
7.9k points