2022-10-27 15:07:13 +00:00
|
|
|
export function fibonacci(value) {
|
|
|
|
// implementar logica aqui
|
2022-10-28 17:02:30 +00:00
|
|
|
const fibo = [0, 1]
|
|
|
|
for (let i = 2; i <= value; i++) {
|
|
|
|
fibo[i] = fibo[i-1] + fibo[i-2]
|
|
|
|
}
|
|
|
|
return fibo[value]
|
2022-10-27 15:07:13 +00:00
|
|
|
}
|