forked from M3-Academy/challenge-algorithms-v2.0
6 lines
176 B
JavaScript
6 lines
176 B
JavaScript
export function fibonacci(value) {
|
|
// implementar logica aqui
|
|
if (value === 0) return 0;
|
|
if (value === 1) return 1;
|
|
return fibonacci(value - 1) + fibonacci(value - 2)
|
|
} |