Delteing items from tables?

How do I get rid of a thing thats inside a table? I thought of doing

myTable = {"Pie tastes good"}

myTable[1]  = nil

but I thought there might be unforeseen problems with this. Is there another way?

table.remove(myTable,1) See table.remove in the online manual for more info.

I think that table.remove() might do the same thing as table[1] = nil. Correct me if I’m wrong, but I think that if you did something like

myTable = {"A", "B", "C"}

table.remove(myTable, 2)

It would push C, index 3, down to index 2.

Just setting the element to nil will not shift the following elements down to fill the “hole”. You have to use table.remove to do that.