lua remove from array code example
Example 1: lua How to remove index from table
table.remove(table, index:num)
Example 2: 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