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