Skip to end of banner
Go to start of banner

For Loop Example 3

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

fruit = "Cranberry|Grape|Grapefruit|Kiwifruit|Lemon|Lime|Mango|Orange";

for(int x = 0; x < size(fruit); x++) {
    runnerLog(fruit[x]);
}

Sometimes you need to know what number (index) you are on while looping through an array.
In those cases you would use this method.

  • No labels