📌  相关文章
📜  在 javascript 中斐波那契的哪个实现应该更快? - Javascript代码示例

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

代码示例1
var looping = function(n) {
    var a = 0, b = 1, f = 1;
    for(var i = 2; i <= n; i++) {
        f = a + b;
        a = b;
        b = f;
    }
    return f;
};