LuLua · Lesson 1 of 8
Hello, Lua
Lua's entire syntax fits on a postcard. If you've never programmed before, this is one of the gentlest starts there is.
No semicolons, no braces, no type declarations. Variables are declared with local — and you should always use it. Assigning without local creates a global variable, which is the classic source of Lua bugs.
⚠ Warning
Forget 'local' and the variable becomes global — visible and mutable from everywhere, including other files. Make writing 'local' muscle memory now.
Forget 'local' and the variable becomes global — visible and mutable from everywhere, including other files. Make writing 'local' muscle memory now.