Understand Lua closures, lexical scope, captured-variable lifetime, higher-order functions, callbacks, loop capture pitfalls, and practical function-factory patterns.
Lua Control Structures: if, while, repeat, for, break and goto
Learn Lua conditions and truth values, while and repeat loops, numeric and generic for loops, break, return, and goto, with syntax and behavior examples.
Lua Local Variables and Scope: Blocks, Shadowing and Lifetime
Learn Lua lexical scope, local declaration timing, function and do blocks, multiple assignment, variable shadowing, lifetime, and the risks of accidental globals.
Lua File I/O: io.open, read, write, Streams and System Commands
Read and write files in Lua with io.open, file handles, read formats, lines, write, seek, standard streams, temporary files, renaming, and system commands.
Lua Functions: Parameters, Multiple Returns, Varargs and Tail Calls
Learn Lua function definitions, parameters, first-class functions, multiple return values, variadic arguments, recursion, table.unpack, and proper tail calls.
Lua Tables: Creation, Indexing, Arrays, Iteration and Copying
Learn Lua table creation and indexing, array-like sequences, iteration with pairs and ipairs, insertion, removal, sorting, copying, identity, and equality behavior.
Lua Strings: Literals, Concatenation, Bytes and UTF-8
Learn Lua string immutability, literals, escapes, concatenation, length, long strings, conversion, standard library functions, arbitrary bytes, and UTF-8 handling.
Lua Numbers: Integers, Floats, Arithmetic, Randomness and Precision
Learn Lua integers, floating-point values, numeric literals, arithmetic, floor division, modulo, conversions, random values, numeric ranges, and precision limits.
Getting Started with Lua: Scripts, Syntax, Values, Functions and Tables
Start programming in Lua by running scripts and learning syntax, comments, variables, nil, booleans, numbers, strings, functions, tables, and the standalone interpreter.
Lua Shallow vs Deep Copy: Cycles, Shared References and Metatables
Compare Lua table assignment, shallow copy, and deep copy while preserving nested tables, cycles, shared references, table keys, and optional metatables.