我怎么把下面的代码改写成函数式语言,不用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,});
}宝慕林4294392
至尊宝的传说
相关分类