Posts by moonblast • 1 point
1 post
-
-4
votes1
answer47
viewsQ: Why is the while condition not an infinite loop?
Why the condition of this while is not a loop infinite? function fibonacci(n) { const fibSequence = [1]; let currentValue = 1; let previousValue = 0; if (n === 1) { return fibSequence; } let…