Rust for loop countdown using range operator does not work When I try this
for i in 1..9 {println!("{}",i)}
I got
1
2
3
4
5
6
7
8
Which is to be expected But when I try this
for i in 9..1 {println!("{}",i)}
I got nothing
I'm expecting to see something like this
8
7
6
5
4
3
2
1
Question
- Why does it not work
- How to count down using for loop in Rust