📜  javascript fibonacci 系列 - Javascript 代码示例

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

代码示例4
const fibo = (n, memo = {}) => memo[n] || (n <= 2 ? 1 : (memo[n] = fibo(n - 1, memo) + fibo(n - 2, memo)));

// Examples
fibo(6);    // 8