The following two tables are equivalent:
NTI = {["John"] = "rhythm guitar"}
NTI = {John = "rhythm guitar"}
if the key is a valid identifier, it can be written out without the [" "] around it.
ipairs loops through arrays
pairs loops through non-arrays (and loops through in an arbitrary order)
functions inside an object are called methods.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment