From c77982c6421734099e399827d47bfdfc52fb9b06 Mon Sep 17 00:00:00 2001 From: Stephan Rehfeld Date: Wed, 8 Apr 2026 18:05:06 +0200 Subject: [PATCH] Range syntax --- src/main.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/main.rs b/src/main.rs index b4eb396..f7d85d1 100644 --- a/src/main.rs +++ b/src/main.rs @@ -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); } }