forked from M3-Academy/challenge-algorithms-v2.0
Develop #1
@ -1,4 +1,8 @@
|
||||
export function fibonacci(value) {
|
||||
// implementar logica aqui
|
||||
|
||||
const fibo = [0, 1]
|
||||
for (let i = 2; i <= value; i++) {
|
||||
fibo[i] = fibo[i-1] + fibo[i-2]
|
||||
}
|
||||
return fibo[value]
|
||||
}
|
Loading…
Reference in New Issue
Block a user