Cosmo/examples/strings.cosmo

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 .. "\"")