forked from M3-Academy/challenge-algorithms-v2.0
9 lines
187 B
JavaScript
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;
|
|
} |