Static function
Native
table.insert
Inserts element value at <code>position</code> in <code>tbl</code>, shifting up the elements <code>tbl[position], tbl[position + 1], ···, tbl[#tbl]</code>
Syntax
table.insert(tbl, position = #tbl + 1, value = "")
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
tbl
|
table | — | The table to insert the variable into. |
position
optional
|
number | #tbl + 1 |
The position in the table to insert the variable. If the third argument is nil this argument becomes the value to insert at the end of given table. |
value
optional
|
any | "" |
The variable to insert into the table. |
Returns
- number