
关于使用table.insert向表里插入新值的方法
正常情况下比如有这样一个表
local list = {apple, banana, peach} 然后插入,这样的我懂
table.insert(list, "grapes"} 但是假如有这样一个表
local list = { ["apple"] = true, ["banana"] = true, ["peach"] = true, } 应该如何使用table.insert插入以下内容?
"grapes" = true 1 Joey2022 Jun 9, 2022 list.grapes = true |
2 changnet Jun 9, 2022 list.grapes = true 或者 list["grapes"] = true |
3 MajestySolor OP |