table.remove(t, [location])
Removal is done at the specified location. The remaining elements are re-indexed sequentially and the table is resized.
Option |
Description |
t |
The table on which to perform the operation. |
location (optional) |
The location in the table from which to remove the element. By default, set to the end of the table |
You can remove the fourth item from the table created above:
> table.remove(t,4)
> print(Length(t))
4