Examples · learn/04-control · 95 of 339
for-range
tin run examples/learn/04-control/for-range.tinfn main() {
for i in 0..3 { // 0, 1 and 2: the end is not included
print("lap {i}")
}
var total = 0
for n in 1..101 {
total += n
}
print("1 + 2 + ... + 100 = {total}")
}