3. Your First While Loop - Bugs or Bad Code?


I've seen this issue before, but haven't found a solution yet. Can someone please help me understand why this isn't rendering in the display (browser) window? My initial thought was that I was creating an infinite loop or this section has a bug. Please advise!



Indeed you entered in a forbidden infinite loop :grinning:
Line 13 should be $loopCount = $loopCount + 2; For the moment, the variable loopCount is not updated. I would also remove line 14.


Ah...thanks for the help! I added line 14 thinking that would properly exit the loop as to avoid the infinite loop. The irony was that I still created one!