Loops

The For Loop

The for loop runs a block of code until it reaches the end of a given sequence. In standard, that can be with a single int to execute a specific number of times or for each object in an array. You can use the @ to indicate the current working object.

This example will print the number the loop is on, five times.

    
    for: 5 {
        print @
    }
    

Then, if you want to iterate through an object like database results, do...

    
    results [vhl]

    #Print each vehicle in results
    for: results {
        print @
    }