What is this extra line for?


I am working on the while loop, which I am kind of getting the hang of and all of the sudden a little piece of code is appearing in the editor that I am not sure what it is doing.

Could someone explain to me what the soloLoop() on line 9 is doing? Is it calling the function to run again? Isn't that what a loop is supposed to do by itself?

Replace this line with your code.


Yeah you are right when you say;

But because the loop is inside of a function you have to first call the function to run the loop.

Let me know If that it still doesn't make sense. But if that helped please mark my reply as the solution.


I think I understand what you are saying, soloLoop(); on line line 9 is calling the loop which only runs once due to the soloLoop being set to false, line 6. I am assuming that the function does not run again becuase soloLoop is set to false inside of the function and not inside of the function. Is this correct?


Yes exactly so as you have set soloLoop to false after the rest of the function it only runs once.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.