How do I get the highest integer in a table in Lua?

Jeremy picture Jeremy · Mar 3, 2011 · Viewed 26.7k times · Source

How do I get the highest integer in a table in Lua?

Answer

Pivete picture Pivete · Mar 3, 2011
math.max(unpack({1, 2, 3, 4, 5}))