feat(04-fibonacci)executa exercicio 4

This commit is contained in:
Henrique Martins Silva 2022-10-28 22:52:07 -03:00
parent 797e1de18a
commit 3bcd58687b

View File

@ -1,4 +1,11 @@
export function fibonacci(value) { export function fibonacci(value) {
// implementar logica aqui // implementar logica aqui
if (value === 0){
return value
}else if (value === 1) {
return value
}else{
return fibonacci(value - 1) + fibonacci(value - 2)
}
} }