Table

From PKC
Revision as of 08:07, 9 August 2021 by Benkoo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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