JS中定义对象和集合

在js中定义对象:var obj = {};
  obj['a']=1;
  obj['b']=2;
在js中定义集合:var list = [];

  list.push(obj);

原文地址:https://www.cnblogs.com/ZT-SummerRain/p/7191237.html