其他分享
首页 > 其他分享> > 给二维数组动态赋值

给二维数组动态赋值

作者:互联网

        let arr = []
            for (let i = 0; i < menuList.length; i++) {
                var arr2 = []
                for (let j = 0; j < menuList[i].chileMenuList.length; j++) {
                    arr2[j] = menuList[i].chileMenuList[j].permission
                }
                arr[i] = arr2
            }

 

标签:arr,chileMenuList,++,二维,let,arr2,数组,menuList,赋值
来源: https://www.cnblogs.com/brillant/p/16494044.html