HexLibraryHexLibrary
</> HexCodeSign inSign up
PythonJavaScriptTypeScriptCC++JavaPHPGoRustRubyBashSQLLuaPerlCOBOLPascalDelphiFortranDartSwiftC#JuliaGroovyRElixirHaskellKotlinScalaClassic ASPClipperMS-DOS
LESSONS
Introduction to LuaVariablesNumbers & MathStringsTablesConditions (if)Loops (for / while)Functions
REFERENCE
📖 Overview
🖥️ Output
📦 Variables
🔢 Numbers & Math
✍️ String
📋 Table
🔁 Condition & Loop
🧩 Function
Lua›REFERENCE

Lua — Command Reference

Lua's most used commands — a simple scripting language widely used in games and embedded systems. Each with an explanation and a working example.

7 categories · 18 commands

🖥️

Output

print and formatting.

print()Concatenation ( .. )string.format()
3 commands →
📦

Variables

local, global, and nil.

local / variablenil
2 commands →
🔢

Numbers & Math

Arithmetic and the math library.

Arithmetic ( + - * / % ^ )math.sqrt / math.floor
2 commands →
✍️

String

Length, uppercase, substring, and search.

#text / string.upperstring.sub / string.find
2 commands →
📋

Table

Lua's only data structure: acts as both an array and a dictionary.

Table (as an array)table.insert / table.removeTable (as a dictionary)
3 commands →
🔁

Condition & Loop

Decision making and repetition.

if / elseif / elsefor (numeric)ipairs / pairswhile
4 commands →
🧩

Function

Function definition.

functionMultiple return
2 commands →
HexLibraryHexLibrary

Learn programming more clearly. Every command is explained line by line with colors, reinforced with runnable exercises, test your code instantly — all in one place, free.

Learn

  • Home
  • Languages & Lessons
  • HexCode

Company

  • About
  • Contact

Legal

  • Privacy Policy
  • Terms of Use

Other Projects

  • HexToolz
  • Free Service Manuals
© 2026 HexLibrary · The clearest way to learn code