feat(04-fibonacci): Adiciona função

This commit is contained in:
Emerson Fully 2022-10-29 14:00:04 -03:00
parent 6c1bf006f4
commit 6abc22ea8e

View File

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