Skip to content

Instantly share code, notes, and snippets.

@cty41
Created August 25, 2017 03:42
Show Gist options
  • Save cty41/162e9550bf0f20b70037b1420292ab66 to your computer and use it in GitHub Desktop.
Save cty41/162e9550bf0f20b70037b1420292ab66 to your computer and use it in GitHub Desktop.
efficient way to determine if a Lua table is empty (contains no entries)?
if next(myTable) == nil then
-- myTable is empty
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment