Names, comments and quoted text
LESSON 02
Write the clue exactly as it should appear, including a quotation mark or a second line.
local Script = {}function Script.run(context)
-- A single-line comment ends at the newline.
local owner = "Ada"
local clue = 'The label reads "west".'
local note = [[First bell: enter.
Second bell: wait.]]
--[[
An author note can span lines.
]]
local result = owner .. ": " .. clue .. "\n" .. note
Log(result)
return result
endreturn ScriptLua names are case-sensitive. A name can contain letters, digits and underscores, with a letter or
underscore first. Scripts conventionally indent each block and put one statement on each line. Use
end to close a function or conditional.
Single and double quotes both create strings. Pick the one that needs fewer escapes. Within a
quoted string, \n makes a newline and \\ inserts one backslash. Long brackets preserve line breaks
and backslashes. Use [=[ and ]=] if the text must contain ]].
Try replacing the word west with east. Only the quoted clue should change.
