andrzej1234
New Coder
Hi, can anyone explain why and how the number '2' is not skipped in the fib sequence?
const fib = [0,1];
for(let i=0; i < 18; i++) {
let nextfib = fib + fib[i +1]
fib.push(nextfib);
}
console.log(fib);
When I'm trying to figure out the steps I'm missing number 2 in the fib sequence
const fib = [0,1];
for(let i=0; i < 18; i++) {
let nextfib = fib + fib[i +1]
fib.push(nextfib);
}
console.log(fib);
When I'm trying to figure out the steps I'm missing number 2 in the fib sequence
