3. the 'while' loop NEED HELP!


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

    var slaying= true;
        if (youHit)
            console.log("You hit the dragon and did " + damageThisRound + "damage!");
            totalDamage =damageThisRound;


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