diff --git a/04-fibonacci/index.js b/04-fibonacci/index.js index 37c64cc..ab5ba8c 100644 --- a/04-fibonacci/index.js +++ b/04-fibonacci/index.js @@ -1,4 +1,6 @@ export function fibonacci(value) { - // implementar logica aqui - -} \ No newline at end of file + if(value < 2) { + return value + } + return fibonacci(value - 1) + fibonacci(value - 2) +}