2022-10-27 15:07:13 +00:00
|
|
|
export function fibonacci(value) {
|
|
|
|
// implementar logica aqui
|
2022-10-28 18:11:33 +00:00
|
|
|
let num1 = 0;
|
|
|
|
let num2 = 1;
|
|
|
|
for(let i = 0; i < value; i++){
|
|
|
|
let aux = num1;
|
|
|
|
num1 = num2;
|
|
|
|
num2 += aux;
|
|
|
|
}
|
|
|
|
return num1;
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|