Is there inherently anything different in this case?

Did the challenge, used a foreach instead of a nested for loop. Wanted to ask you if there is anything inherently wrong with this approach.

2 Likes

For operations such as these, either a foreach or the for loop is just fine. Be aware that if you wanted to show or hide based on the location, then it would not work as with a foreach you do not have access to the indexers.

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms