While #
While loops will run as long as the condition is truthy.
Print numbers from 0 to 3:
π > a = 0
π > while (a != 4)
puts(a)
a = a + 1
end
// which prints
0
1
2
3
=> null
While loops will run as long as the condition is truthy.
Print numbers from 0 to 3:
π > a = 0
π > while (a != 4)
puts(a)
a = a + 1
end
// which prints
0
1
2
3
=> null