Crash Course of Lua

Table of Contents

1. Variables, Scope and Global

do ... end serves the functionality of “scope” in Lua, as { ... } do in other languages. To define a local variable, use local keyword.

To declare global variables, in Lua 5.5, we should explicitly use global keyword.

2. Control Flow

Date: 2026-08-11 Tue

Author: ArcaLunar