LuLua · Lesson 4 of 8
Functions
Functions in Lua are values — store them in tables, pass them around, return several results at once. This flexibility is why Lua works so well as a scripting layer.
✦ Tip
s:upper() is sugar for string.upper(s) — the colon passes the value as a hidden first argument. You'll meet it again with objects in the OOP lesson.
s:upper() is sugar for string.upper(s) — the colon passes the value as a hidden first argument. You'll meet it again with objects in the OOP lesson.