summary refs log tree commit diff
path: root/examples/5.src
diff options
context:
space:
mode:
Diffstat (limited to 'examples/5.src')
-rw-r--r--examples/5.src6
1 files changed, 5 insertions, 1 deletions
diff --git a/examples/5.src b/examples/5.src
index d9a8dad..88c171c 100644
--- a/examples/5.src
+++ b/examples/5.src
@@ -1,3 +1,7 @@
+/* As you see, the language supports variable scopes */
+
+let x = 18;
+
 let foo = () => {
 	let x = 1;
 	print(x);
@@ -5,8 +9,8 @@ let foo = () => {
 };
 
 let main = () => {
+	print(x);
 	let x = 2;
-	/* As you see, the language supports variable scopes */
 	foo();
 	print(x);
 	return x;