Answers for "how to get last element of array in lua"

Lua
2

lua last item in table

table[#table]
Posted by: Guest on June-11-2020
1

how to get last element of array in lua

local arr = {1,2,3,4,5,6,7,8,9,10}
for i,v in pairs(arr) do
	last = #arr - 0
end
print(last)
Posted by: Guest on September-01-2020

Code answers related to "how to get last element of array in lua"

Browse Popular Code Answers by Language