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