递归函数实现方法

var logicCeshi = {
            aa:0,
            ceshioa:function (){
                var _this=this;
                if(_this.aa<10){
                    _this.aa++;
                    a(_this.aa);
                    _this.ceshioa();                
                }
            }
        }
        function a(bb){
            if(bb==10){
                console.log('funcB'+bb);
            }else{
                console.log('funcA'+bb);
            }
        }
 logicCeshi.ceshioa();

 

posted @ 2017-01-19 15:11  小猪冒泡  阅读(247)  评论(0编辑  收藏  举报