Created
August 11, 2015 10:59
-
-
Save wittx/7958d332b617b65bcbe9 to your computer and use it in GitHub Desktop.
maxTableValue
This file contains 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
local function maxTableValue(tab) | |
if not tab[1] then return 0; end | |
local value = tab[1]; | |
for i = 2, #tab do | |
if value < tab[i] then | |
value = tab[i]; | |
end | |
end | |
return value; | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment