forked from M3-Academy/challenge-algorithms-v2.0
feat(challenge) desafio fibonacci finalizado
This commit is contained in:
parent
1f50fc9edf
commit
7f2961dd30
@ -1,4 +1,6 @@
|
|||||||
export function fibonacci(value) {
|
export function fibonacci(value) {
|
||||||
// implementar logica aqui
|
// implementar logica aqui
|
||||||
|
if (value === 0) return 0;
|
||||||
|
if (value === 1) return 1;
|
||||||
|
return fibonacci(value - 1) + fibonacci(value - 2)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user