July 2018
Beginner
202 pages
5h 42m
English
A table in Lua is created with the curly brace {} symbols. After a table is created, it needs to be assigned to a variable. If you don't assign the table to a variable, you won't be able to refer to it. The following code creates a new table and assigns it to the tbl variable. The code then prints out the type of the tbl variable, which should be a table:
tbl = {} -- Creates table, assigns it to tbl variableprint("The type of a table is: " .. type(tbl))