summaryrefslogtreecommitdiff
path: root/Loop over an array with for-in.md
diff options
context:
space:
mode:
Diffstat (limited to 'Loop over an array with for-in.md')
-rw-r--r--Loop over an array with for-in.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/Loop over an array with for-in.md b/Loop over an array with for-in.md
new file mode 100644
index 0000000..edeacfb
--- /dev/null
+++ b/Loop over an array with for-in.md
@@ -0,0 +1,7 @@
+[[Rust]]
+
+```rust
+for number in (1..4).rev() {
+ println!("reversed: {number}");
+}
+``` \ No newline at end of file