3. the 'while' loop NEED HELP!


#1

    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){
        if (youHit)
            console.log("You hit the dragon and did " + damageThisRound + "damage!");
            totalDamage =damageThisRound;

#2

You lack a } to close your while loop and do you know how it works if you omit the {} after if?