摘要: function fib(){ var x = 0,fib1 = 1,fib2 = 1; return function(){ var result = 0; if(x==0||x==1){ result = 1; }else{ result = fib1 + fib2; fib1 = fib2; fib2 = result; } x++; return result; }}var f1 = fib();v... 阅读全文
posted @ 2013-02-05 10:13 ~洛书~ 阅读(217) 评论(0) 推荐(0) 编辑