feat(fibonacci): implementa function

This commit is contained in:
Cainã Milech 2022-10-28 18:04:24 -03:00
parent 1db8a79f3b
commit 2efed9f049

View File

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