Loops (for / while)
Ranges with for (1..5), conditional repetition with while, and iteration with .each{}.
Simple enough for a 5-year-old to understand
range with for
The range 1..3 DOES include 3.
for (i in 1..3) { println i}🎯 Exercise & Practice
Test what you've learned — answer, write code, check instantly. (1 left)
🎯 Expected output: 1
2
3
4
5