// 三个for循环
        var arr = [1, [5, 7, 98], 5, 6, [[0, 8, 45]]]
        for (var i = 0; i < arr.length; i++) {
            for (var j = 0; j < arr[i].length; j++) {
                for (var l = 0; l < arr[i][j].length; l++) {
                    document.write('三维数组' + arr[i][j][l] + '<br /><br />')
                }
                document.write('二维数组' + arr[i][j] + '<br /><br />');
            }
            document.write('一维数组' + arr[i] + '<br /><br />');
        }
Last modification:October 9th, 2019 at 09:16 pm
如果觉得我的文章对你有用,请随意赞赏