let data = {}
let arr = [
    { width: 155 }, { width: 180 }, { width: 180 }, { width: 240 },
    { width: 130 }, { width: 280 }, { width: 100 }, { width: 50 }
]
for (let j = 0; j < arr.length; j++) {
    if (j >= 1) {
      console.log(j - 1, j)
      data[j] = arr[j] = [j - 1].with + arr[j] = [j].with
    }
  }
如何做到
data {    0: arr[0] + arr[1],    1: arr[0] + arr[1] + arr[2],    2: arr[0] + arr[1] + arr[2] + arr[3] 
    ......
} 皈依舞
皈依舞 
					梵蒂冈之花
 随时随地看视频慕课网APP
随时随地看视频慕课网APP
相关分类