Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我的对象文字:
var obj = {key1: value1};
我该如何添加
{key1: value1,value2,value3}
到obj?
obj
您的对象的值必须是存储单独值的数组或对象,如下所示:
{key1: [value1,value2,value3]}
或者
{key1: new compositeValue(value1, value2, value3)}