📜  将数组转换为关联数组的函数 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:36.212000             🧑  作者: Mango

代码示例1
var obj = {};
for (var i = 0, length = a.length; i < length; i += 2) {
  obj[a[i]] = a[i+1];
}