First if.. what is worng?


#1


while (slaying===false) 

  { 
    if (youHit)
       {
        console.log("you win");
       
       }
    else
        {
        console.log("dragon defeated you");
        }
    
     
   };


#2

the loop is suppose to run, so slaying should be set to true before the loop, and in the end of the loop:

else
        {
        console.log("dragon defeated you");
        }
    # here
   };

where i put the comment: # here you should set slaying to false


#3

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