diff --git a/04-fibonacci/index.js b/04-fibonacci/index.js index 9aacc7c..00aae04 100644 --- a/04-fibonacci/index.js +++ b/04-fibonacci/index.js @@ -1,11 +1,8 @@ export function fibonacci(value) { // implementar logica aqui - if (value === 0){ - return value -}else if (value === 1) { + if (value === 0 || value === 1){ return value }else{ return fibonacci(value - 1) + fibonacci(value - 2) -} - + } } \ No newline at end of file