Tables in Lua implement associative arrays. That is, they can be indexed not just with numbers, but also with strings or any other value of the language, except nil.
When you use tables, you should choose how to index Lua tables (either numerically or non-numerical numbers).
Most functions in the
table library assume that the table represents a (numerically-indexed) array or list. For these functions, when we talk about the "length" of a table we mean the result of the length operator.