aboutsummaryrefslogtreecommitdiff
path: root/examples/hello.sloth
diff options
context:
space:
mode:
Diffstat (limited to 'examples/hello.sloth')
-rw-r--r--examples/hello.sloth6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/hello.sloth b/examples/hello.sloth
new file mode 100644
index 0000000..3dbc685
--- /dev/null
+++ b/examples/hello.sloth
@@ -0,0 +1,6 @@
+print("Hello World!");
+
+## A basic for loop greeting the user in multiple languages
+for greeting in ["Hello", "Hola", "你好"] {
+ print(greeting + " World!");
+}