challenge-algorithms-v2.0-c.../04-fibonacci/index.js
2022-10-28 07:40:50 -04:00

8 lines
167 B
JavaScript

export function fibonacci(value) {
// implementar logica aqui
if (value <= `${1}`) {
return value;
}
return fibonacci(value - 1) + fibonacci(value - 2);
}