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

9 lines
187 B
JavaScript

export function fibonacci(value) {
// implementar logica aqui
if(value < 2){
value = value;
}else{
value = fibonacci(value - 1) + fibonacci(value - 2);
}
return value;
}