Unexpected token else


#1

var slaying = true;

var youHit = Math.floor(Math.random()*2);

var damageThisRound = Math.floor(Math.random()*5 + 1);

var totalDamage = 0;

while(slaying) {

    if(youHit=1){

         console.log("Congrat's, You hit the Dragon!")

        slaying = false; };

    else {console.log("The Dragon Defeated you!")}

        slaying = false; };

assistance ? : P


#2

nevermind got it......................................