Range syntax

This commit is contained in:
Stephan Rehfeld committed 2026-04-08 18:05:06 +02:00
1 parent 97e5c2fd72
commit c77982c642
1 file changed
+1 -5
+1 -5
View File
@@ -1,9 +1,5 @@
fn main() {
// Definition of an array
let arr = [4, 8, 15, 16, 23, 42];
// loop over every element of the array
for value in arr {
for value in -10..10 {
println!("Value: {}", value);
}
}