Need help with the 'while' loop


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


What exactly are you struggling with? You're suppose to create a while loop that loops while slaying is true. So you should create a while loop that takes slaying as the argument (sine while loops run as long as their argument is true), and then set slaying to false inside so that you don't create an infinite loop. Like this:

   slaying = false;