For
Iterate a numeric range.
for .. in ..
0..3 means from 0 up to (but not including) 3.
fn main() {
for j in 0..3 {
print(j)
}
}fn main() -> void {
for j in 0..3 {
print(j)
}
}Output
0
1
2
Fast · Safe · Minimal
Iterate a numeric range.
0..3 means from 0 up to (but not including) 3.
fn main() {
for j in 0..3 {
print(j)
}
}fn main() -> void {
for j in 0..3 {
print(j)
}
}Output
0
1
2