---
title: "For Loop Example 3"
canonical: "https://support.appfire.com/space/PSCONF/15305466/For%20Loop%20Example%203"
format: markdown
---
> Macro (aura-html)

> Macro (excerpt)
> 
> ```
> 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.