4/6 the 1st 'if' statement


#1

I have an error that says: Oops, try again! Make sure you log a message to the console to let the player knows if (s)he won or lost!
I have no idea what's causing it!
here's my code:
var slaying = true;
var youHit = Math.floor(Math.random() * 2);
var damageThisRound = Math.floor(Math.random() * 5 + 1);
var totalDamage = 0;
var slaying = true;
while(slaying) {
slaying = false;
}
while(slaying) {
if(youHit === 1) {
console.log("You hit!");
} else {
console.log("You missed!");
}
slaying = false;
};


#2

or not.
I just had to delete
slaying = false;
}
while(slaying) {