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

7 lines
158 B
JavaScript
Raw Normal View History

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