如何使用for迴圈 將資料整理成如下的狀態
var bb = ["2009/10","2009/11"];
var bbb = ["abc","efg"];
var bbbb = [10.1,10.2,11.1,11.2];
const data = {};
for (let index = 0; index < bb.length; index++) {
const object = {};
for (let bbbIndex = 0; bbbIndex < bbb.length; bbbIndex++) {
object[bbb[bbbIndex]] = bbbb[index * bbb.length + bbbIndex];
}
data[bb[index]] = object;
}