📜  javascript代码示例中的斐波那契数列

📅  最后修改于: 2022-03-11 15:03:24.258000             🧑  作者: Mango

代码示例6
let fibo = [0, 1]
for (var i = 2; i <= 10; i++) {
    fibo[i] = fibo[i - 1] + fibo[i - 2];
}
console.log(fibo)
//Output: [ 0, 1,  1,  2,  3,5, 8, 13, 21, 34, 55]