Learn Basic JavaScript by Building a Role Playing Game - Step 151

Tell us what’s happening:

What’s wrong in else block ?

if (isMonsterHit()) {
    monsterHealth -= weapons[currentWeapon].power + Math.floor(Math.random() * xp) + 1;    
  }
  else{text.innerText+="You miss.";}

Console output:

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 151

Hey @TTEOTM
just add space between " and the Y

Happy coding

2 Likes

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