Skip to content
This repository was archived by the owner on Sep 30, 2020. It is now read-only.

Commit 8a6373e

Browse files
author
Esteban Echeverry
committed
Make example use an array and a for loop
1 parent 70a4dd6 commit 8a6373e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

_includes/example.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
// This code is editable and runnable!
22
fn main() {
3-
println!("Hello");
4-
println!("Hola");
5-
println!("こんにちは");
6-
println!("您好");
3+
let greetings = ["Hello", "Hola", "こんにちは", "您好"];
4+
5+
for greeting in greetings.iter() {
6+
println!("{}", greeting);
7+
}
78
}

0 commit comments

Comments
 (0)