Console printing correctly but the exercise says error!


Hi guys, see my code, the console does correctly say 'Looped Once!' however the exercise keeps giving me the error:

Oops, try again. It looks like you're not printing the right string to the console.

//Remember to make your condition true outside the loop!
var myState = true

var soloLoop = function(){
  while(myState) {
      console.log("Looped Once!");
      myState = false; 



Have you compared the string that should be printed to what you print? Are they identical? Is it at all possible to tell them apart?


Crikey....I used a capital 'O'...had no idea this had to be that precise!! Been looking at the code for ages haha thanks for the quick reply!


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