Loops (for / while)
Iterating over ranges/collections with for and conditional repetition with while.
Simple enough for a 5-year-old to understand
for (range)
1..n does NOT include n; 1..=n includes n.
fn main() { 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