Question 4 // really dont know whats wrong


#1

please can anyone tell me whats wrong with my code?
God bless you!

slaying = true
youHit = Math.floor(Math.random()*2)
damageThisRound = Math.floor(Math.random()*5 + 1)
totalDamage = 0

while(slaying){
if(youHit) = 1 {
console.log("Congratulaions! You hit the Dragon");
}
else{
console.log("You miss!");
}

slaying = false;
};


#2

What is the error that you are getting?


#3

I think i figured it out, you should include the = 1 part between the brackets!