diff options
| author | Baitinq <[email protected]> | 2025-01-20 00:51:23 +0100 |
|---|---|---|
| committer | Baitinq <[email protected]> | 2025-01-20 00:51:23 +0100 |
| commit | 8c3a703cb76b1bc50ddc9ae979c62102f7fc9e0e (patch) | |
| tree | 536bbc64b2a70c4d4bb5a27dfdb988ab02005cc5 /examples | |
| parent | Start working on proper operator precedence (diff) | |
| download | pry-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.src | 13 |
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; +}; |