摘要: function fib(max) { let t, a = 0, b = 1, arr = [a, b]; while (arr.length < max) { [a, b] = [b, a + b]; arr.push(b); } return arr; } fib(5); 结果: [0, 1, 阅读全文
posted @ 2018-09-07 10:42 刘倩文 阅读(82) 评论(0) 推荐(0) 编辑