lua table empty index code example
Example 1: lua table is empty
if not next(myTable) then
-- Table is empty
end
Example 2: lua empty table
for k,v in pairs(table) do
table.remove(table, k)
end
if not next(myTable) then
-- Table is empty
end
for k,v in pairs(table) do
table.remove(table, k)
end