I'll add something to juancarlospaco's helpful explanation:
    
    
    var
      k: array[10, int]
    
    for i in k.low .. k.high:
       k[i] = (i + 1) * 10
       if k[i] mod 2 == 0:
          echo k[i]
    
    Run

Note the `.low` and `.high` in the loop. That's a good way to avoid index 
errors and also allows you to later change your array to, say, start at 1 
instead of 0 and the loop will still work fine.

Reply via email to