How to add a new key and value for a table?

Kenneth Law

  • Newbie
  • Posts: 35
How to add a new key and value for a table?
«  »
Give a situation that I have localed a table like
Code: [Select]
local table = { "a": 1, "b": 2, "c": 3 };
How can I add a new key and a new value for it then?
For example a new key which is "d" and a new value which is 4 so that the table will become { "a": 1, "b": 2, "c": 3, "d": 4 };

Spiller

  • Newbie
  • Designer
  • Posts: 19