While loop syntax Error


#1

Could someone tell me what's missing in my code?

Mycode:

var soloLoop = true;
while(soloLoop) {
console.log("Looped once!")
soloLoop = false;

}

//Your code goes here!

};

soloLoop();

Error Msg: SyntaxError: Parser error

Instructions:

Inside the soloLoop function, write a while loop that takes an initial condition that's true. Your loop should log "Looped once!" to the console, then change that initial condition to false.

MAKE SURE to set your condition to false in the body of your loop. Otherwise, you'll loop forever!


#2

You have two errors
This brace

does not have any match remove it


Now here

soloLoop is a variable not a function. you are calling it like a function