Repetition With Loops Rust has 3 kinds of loops - loop, while and for. Loop syntax: // for let counter = [10, 20, 30, 40, 50]; for c in counter { println!("the value is: {c}"); } // while let mut counter = 0; while counter != 3 { counter +=...
blog.artpav.dev2 min read
No responses yet.