Stuck on While Loop on Review Section


I keep getting the error message "Oops, try again. It looks like one of your loops isn't quite right. Check the Hint if you need help!"
Console log prints out my message once, then reads "ReferenceError: count is not defined".

If I remove the "loop();" At the end I pass the course, but I want to know what I've done wrong. I can't see it, though I have painstakingly reviewed so many times! What have I done wrong? TIA.

var helen = 0;
var loop = function(){
while (helen <6) {
    console.log("This should print out five times.  I hope!")
loop ();


Variable helen is defined as 0. Loop is defined as a function. Count isn't defined. What would it increase the value of when the loop runs?


Thanks for that. I understand what you're saying, but in the exercise on looping, that's how it's taught. The code below worked perfectly before in section 4.5,, I'm puzzled.

var count = 0

var loop = function(){
while(count <3){
console.log ("I'm looping!")



Fixed it! I needed to change






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