阶梯相乘

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>Document</title>
    <script type="text/javascript">
         window.onload=function(){
            function a(b){
                var num=1;
                while(b>1){
                    num*=b;
                    b--;
                }
                return num;
            }
            alert(a(4));
         };
    </script>
</head>
<body>
    
</body>
</html>

posted on 2017-07-11 08:34  37℃的冰  阅读(129)  评论(0)    收藏  举报

导航