Deja brew JavaScript [SOLVED]

// You can add strings together, and add numbers into strings.
// Sing along, using string concatenation:
// X potions of health on the wall!
// X potions of health!
// Take Y down, pass it around!
// X-Y potions of health on the wall.

var potionsOnTheWall = 10;
var numToTakeDown = 1;
while(true) {
    hero.say(potionsOnTheWall + " potions of health on the wall!");
    // Sing the next line:
    hero.say(potionsOnTheWall + " potion of health!");
    // Sing the next line:
    hero.say("Take " + numToTakeDown + " down, pass it around!");
    potionsOnTheWall -= numToTakeDown;
    // Sing the last line:
    hero.say(potionsOnTheWall + " potions of health on the wall.");

I have been trying to get this one for some time and I don’t seem to be able to figure it out. Any help would be awesome though I am writing this before I go to bed for the night.

I found the problem, just make “potion of health!” → “potions of health!” (the s)


thank you so much. my dyslexia was getting the best of me and I just could not see it.


you’re welcome (20chars)

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.