Thread:Primexit/@comment-29331244-20150502011443/@comment-29331244-20150503060456

-- Create table t = {} t["foo"] = "foo" t.bar = "bar" t[1] = "one" t[2] = "two" t[3] = "three" t[12] = "the number twelve" t["12"] = "the string twelve" t[true] = "true" t[tonumber] = "yes, even functions may be table keys" t[t] = "yes, a table may be a table key too. Even in itself." -- This creates a table roughly equivalent to the above t2 = { foo = "foo", bar = "bar", "one", "two", [12] = "the number twelve", ["12"] = "the string twelve", "three", [true] = "true", [tonumber] = "yes, even functions may be table keys", } t2[t2] = "yes, a table may be a table key too. Even in itself."