JS递归,对称美

function show(n) {
            document.write(n + "\t");
            if (n > 0) {
                show(n - 1);
            } else {
                document.write("<---->");
            }
            document.write(n + "\t");
        }
        show( 4 );
    </script>

 

posted @ 2017-06-29 15:35  御酒  阅读(126)  评论(0)    收藏  举报