Table

From PKC
Jump to navigation Jump to search

Table in Lua is a kind of associative array, one can see its example here:

t = {}
t["foo"] = 123 -- assign the value 123 to the key "foo" in the table
t[3] = "bar" -- assign the value "bar" to the key 3 in the table
= t["foo"]
123