Range syntax
This commit is contained in:
parent
97e5c2fd72
commit
c77982c642
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user