let arr=[
['黑', '金', '白'],
['16G', '32G'],
['电信', '移动', '联通'],
]
let list=arr.reduce((a, b) => {
return a.flatMap(x => b.map(y => [...x, y]))},
[[]]
)
console.log(list)
生成结果
let arr=[
['黑', '金', '白'],
['16G', '32G'],
['电信', '移动', '联通'],
]
let list=arr.reduce((a, b) => {
return a.flatMap(x => b.map(y => [...x, y]))},
[[]]
)
console.log(list)
生成结果