syntax: 'var'->'let' 'function'->'func'

- 'var' has some weird scoping connotations with users of JS. better to change it to 'let', which will decide whether to make the variable a local or a global
- 'func' looks visually appealing lol
- some minor refactoring done in cparse.c
This commit is contained in:
2023-02-09 15:58:25 -06:00
parent 5d805e258b
commit c8cae03604
16 changed files with 95 additions and 99 deletions

View File

@@ -1,7 +1,7 @@
var words = "hello world! this is a sentence with words separated by space":split(" ")
let words = "hello world! this is a sentence with words separated by space":split(" ")
var str = ""
for (var i = 0; i < #words; i++) do
let str = ""
for (let i = 0; i < #words; i++) do
str = str .. words[i]
print(words[i])
end