Loops (for / while)
Iteration with for using ranges (1:5), conditional repetition with while, and the global scope rule at the top level.
Simple enough for a 5-year-old to understand
for loop
The 1:3 range is from 1 to 3 (3 INCLUDED). The block ends with end.
for i in 1:3 println(i)end🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5