About the Lua Snippets category

Please share helpful Lua snippets here.

For a Lua formatted code block, use 3 back-ticks + lua (no spaces), new line, paste your code, new line, close with 3 back-ticks.

image


-- your code here
local theTable = {
	"One",
	2,
	"three",
	nil,
	"four",
	5
}

-- Returns a table starting with the 
local newTable = select(2,table.unpack(theTable))