App = {}; App.fun0 = function(){ console.log(arguments) }; App.fun1 = function(arg1){ console.log(arguments) }; App.fun2 = function(arg1, arg2){ console.log(arguments) }; App.call1 = function(){ this.fun0(); this.fun1(1); this.fun2(1,2); }; App.call2 = function(){ this.fun1(); this.fun1(1); this.fun1(1,2); }; App.call1(); App.call2();
var sum = function(n){ if(1==n) { return 1; } else { return n + arguments.callee(n-1); } } console.log(sum(10));
原文:http://blog.csdn.net/xufeng0991/article/details/45559229