get length of lua table code example
Example 1: length of table lua
Use the # Operator (#table)
Example 2: how to get the length of a table in lua
myTable = {1, 2, 3}
for i = 1, #myTable do
-- Code
end
Use the # Operator (#table)
myTable = {1, 2, 3}
for i = 1, #myTable do
-- Code
end