我怎么把下面的代碼改寫成函數式語言,不用for循環,直接用map操作可以嗎,該怎么改,求大神指教 const tempData = {name: value[j].name};
const tempDragData = []; for (let k = 0; k < tempArr.length; k++) {
tempData[`col ${k}`] = tempArr[k].fieldName;
tempDragData.push({id: `item-${i++}`, name: value[j].name, content: tempArr[k].fieldName,});
}
for循環用函數式語言改寫
素胚勾勒不出你
2018-08-23 20:06:53