challenge-algorithms-v2.0-n.../04-fibonacci/index.js

4 lines
140 B
JavaScript

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