Indexing for (datatype element : array) loops

@GoToLoop Yah. For this example, the id variable is also used for other things within the class so it’s a handy identifier. And I was just having fun modifying Processing’s Bouncy Ball example. But in the future, yeah, if i need some sort of iterator i’ll just use the vanilla for ( ; ; ) loop. I usually do. Was mostly curious if there was some sort of counter within the enhanced for loop.

Cheers!

2 Likes