Answers for "lua remove first element of table"

Lua
0

lua remove first element of table

local t = {1,2,3,4}
local head = table.remove(t,1)
print( head )
--> 1
print( #t )
--> 3
print( t[1] )
--> 2
Posted by: Guest on January-11-2021

Code answers related to "lua remove first element of table"

Browse Popular Code Answers by Language