You are looking for the insert
function, found in the table
section of the main library.
foo = {} table.insert(foo, "bar") table.insert(foo, "baz")
Related Posts:
- How to remove a lua table entry by its key?
- Concatenation of strings in Lua
- What is a good game engine that uses Lua?
- “attempt to index a nil value”-error in Lua
- How to get number of entries in a Lua table?
- How to dump a table to console?
- Lua – if statement with two conditions on the same variable?
- Lua string to int
- Getting input from the user in Lua
- Does Lua have OR comparisons?
- Lua – Number to string behaviour
- How to iterate through table in Lua?
- Lua: Rounding numbers and then truncate
- How to math.floor to a decimal in Lua?
- Lua Semicolon Conventions
- Logitech/LGHUB Lua – Loop with break
- Lua Program Delay
- Split a string using string.gmatch() in Lua
- Lua replacement for the % operator
- Inline conditions in Lua (a == b ? “yes” : “no”)?
- Lua string.format options
- Creating a timer using Lua
- How to add a “sleep” or “wait” to my Lua Script?
- What is the difference of pairs() vs. ipairs() in Lua?
- Lua read beginning of a string
- Why does Lua have no “continue” statement?
- Lua String replace
- Lua operators, why isn’t +=, -= and so on defined?