Created
December 30, 2012 09:11
-
-
Save prafulliu/4411738 to your computer and use it in GitHub Desktop.
lua get table length
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t = {[2] = 2} | |
local count = 0 | |
for k,v in pairs(t) do | |
count = count + 1 | |
end | |
print(count) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment