It asks "Did you log "looped once" to console."


#1


Keeps asking if I have logged looped once to the console, I don't know where my code went wrong.


 var number = true
var soloLoop = function(number){
  while(number){
      number = false;
      console.log("Looped once!");//Your code goes here!
  }  
};

soloLoop(0);


#2

Yeah no I got it, super simple... -_-


#3

Yes you've shadowed the global variable number (value:true) by using a parameter with the same name (value:0). And as 0 is treated like false your loop is not executed at all. Just in case someone wants to know the problem.


#4

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