Recently I've found out that you can make keys strings, which is super helpful for a lot of things, as well as super-readable, however, table.insert doesn't seem to like strings, and only works with integers.
Example:
-- Throws an error table.insert(table, "key", variable) -- Works fine table.insert(table, 1, variable)
You can just index the table, it's faster and better
table["key"] = variable -- Supports all data and userdata table[workspace] = variable table["key"] -- variable table[workspace] -- variable
There is no way to do that with table.insert
if i am right, i probably am.
table.remove
also only supports integers so you can use same tactic to remove elements from the table
table["key"] = nil