SOURCE

let arr = [
    [1,2,3],
    ['a','b','c'],
    ['你','我','他']
];

function AllSort(arr,resList=[],tempArr =[]){
    let index = tempArr.length;
    arr[index].forEach(item =>{
        let temp = [...tempArr];
        temp.push(item)
        if(temp.length === arr.length){
            resList.push(temp)
            return;
        }
        AllSort(arr,resList,temp)
    })
    return resList;
}
let res = AllSort(arr)
console.log(res)
console 命令行工具 X clear

                    
>
console