将二维数组[['a', 'b', 'cd'],['de'],['e', 'f']]处理后输出为['adee', 'adef', 'bdee', 'bdef', 'cddee', 'cddef']
const arr = [['a', 'b', 'cd'],['de'],['e', 'f'],]
const result = arr.reduce((pre,item) => {
const arr = []
pre.forEach(item1 => {
item.forEach(item2 => {
arr.push(ite1 + item2)
})
})
return arr
})
console.log(result);