We use cookies on this site to enhance your user experience

Strings with Quotes

Strings with Quotes

-- Normal print of Hello, world!
local str0 = "Hello, world!"

-- You can have double-quotes in strings if you use single-quotes around the string instead.
local str1 = 'Hello, "world"!'

-- You can also escape the double-quote character if you put a \ before it.
local str2 = "Hello, \"world\"!"

print(str0)
print(str1)
print(str2)