如何將兩個數組轉換爲對象?javascript數組和對象
我的數組:
arr1.push(3,2,3,6,11,7);
arr2.push("num1","num2","num3","num4","num5","num6");
如何將其轉換爲對象:
[{name:"num1", value:3}, {name:"num2", value:2}, {name:"num3", value:3}, {name:"num4", value:6}, {name:"num5", value:11}, {name:"num6", value:7}]