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

6 lines
151 B
JavaScript
Raw Permalink Normal View History

export function fibonacci(value) {
// implementar logica aqui
2022-10-30 03:21:23 +00:00
if (value < 2) return value;
return fibonacci(value - 1) + fibonacci(value - 2);
}