forked from M3-Academy/challenge-algorithms-v2.0
11 lines
204 B
JavaScript
11 lines
204 B
JavaScript
export function fibonacci(value) {
|
|
// implementar logica aqui
|
|
let num1 = 0;
|
|
let num2 = 1;
|
|
for(let i = 0; i < value; i++){
|
|
let aux = num1;
|
|
num1 = num2;
|
|
num2 += aux;
|
|
}
|
|
return num1;
|
|
} |