摘要:
刚才在IBM DW上看到这篇《JavaScript 技巧与高级特性》,其中关于arguments.callee的部分有一个用递归来求斐波那契数列的例子,简化一下是这样的: //经典递归 functionfibonacci(n){ return(function(n){ if(n==1||n==2) return1; returnarguments.callee(n-1)+arguments.callee(n-2); })(n); } fibonacci(4);//result: 3 ... 阅读全文
搜索
最新评论
- 1. Re:(转载)How browsers work--Behind the scenes of modern web browsers (前端必读)
- @朋友博客集 非常感谢...
- --月全话白
- 2. Re:(转载)How browsers work--Behind the scenes of modern web browsers (前端必读)
- 满满的干货!
- --yikai.shao
- 3. Re:(转载)How browsers work--Behind the scenes of modern web browsers (前端必读)
- 很全面谢谢博主
- --crazyFaith
- 4. Re:(转载)How browsers work--Behind the scenes of modern web browsers (前端必读)
- 这篇文章太牛逼了
- --Lumia1020
- 5. Re:(转载)How browsers work--Behind the scenes of modern web browsers (前端必读)
- 赞!
- --hello-Jesson