mirror of
https://github.com/CPunch/Cosmo.git
synced 2024-11-22 15:30:06 +00:00
CPunch
c8cae03604
- '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
9 lines
214 B
Plaintext
9 lines
214 B
Plaintext
let words = "hello world! this is a sentence with words separated by space":split(" ")
|
|
|
|
let str = ""
|
|
for (let i = 0; i < #words; i++) do
|
|
str = str .. words[i]
|
|
print(words[i])
|
|
end
|
|
|
|
print("\"" .. str .. "\"") |