function fibonacci(n) { function fn(n, curr = 1, next = 1) { if (n === 0) { return curr; } else { return fn(n - 1, next, curr + next); } } return fn(n);}// 递归实现function fb(n) { if (n === 1 || n === 2) { return 1; } return fb(n - 1) + fb(n - 2);}