about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-20 00:51:23 +0100
committerBaitinq <[email protected]>2025-01-20 00:51:23 +0100
commit8c3a703cb76b1bc50ddc9ae979c62102f7fc9e0e (patch)
tree536bbc64b2a70c4d4bb5a27dfdb988ab02005cc5 /examples
parentStart working on proper operator precedence (diff)
downloadpry-lang-8c3a703cb76b1bc50ddc9ae979c62102f7fc9e0e.tar.gz
pry-lang-8c3a703cb76b1bc50ddc9ae979c62102f7fc9e0e.tar.bz2
pry-lang-8c3a703cb76b1bc50ddc9ae979c62102f7fc9e0e.zip
Example: Add example for while loop
Diffstat (limited to 'examples')
-rw-r--r--examples/10.src13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/10.src b/examples/10.src
new file mode 100644
index 0000000..38e6259
--- /dev/null
+++ b/examples/10.src
@@ -0,0 +1,13 @@
+let main = () => {
+	let counter = 0;
+
+	while !(counter == 10) {
+		print(counter);
+	};
+
+	while counter == 0 {
+		print(0);
+	};
+
+	return counter;
+};