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

4 lines
140 B
JavaScript
Raw Normal View History

export function fibonacci(value) {
// implementar logica aqui
2022-10-28 17:54:08 +00:00
return value <= 1 ? value : fibonacci(value - 1) + fibonacci(value - 2);
}