匿名函数递归调用自身

var factorial = function(x){

  if(x<=1) {

    return 1;

  }

  else if(x>1) {

    return x*arguments.callee(x-1);

  } 

}

posted @ 2016-03-11 18:22  Rella  阅读(331)  评论(0编辑  收藏  举报