Loops/For: Difference between revisions

Bait solution
imported>Tromp
(add BLC for loops)
(Bait solution)
Line 590:
The key operator here is 'iter' which gives the current iteration of the loop body it
resides in. When used with the 'times' operator, it generates a countdown.
 
=={{header|Bait}}==
<syntaxhighlight lang="bait">
const ROWS := 5
 
fun main() {
for i := 1; i <= ROWS; i += 1 {
for j := 1; j <= i; j += 1 {
print('*')
}
println('')
}
}
</syntaxhighlight>
 
 
=={{header|bash}}==
24

edits