HyperMath

Removing Elements

Removing Elements

Previous topic Next topic No expanding text in this topic  

Removing Elements

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  

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