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

onst calorieCounter = document.getElementById(‘calorie-counter’);

const budgetNumberInput = document.getElementById(‘budget’);

const entryDropdown = getElementById(‘entry-dropdown’);

hi
where am i going wrong thanks for all your help i advance.

Ian

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
  </head>
  <body>
    <div id="game">
      <div id="stats">
        <span class="stat">XP: <strong><span id="xpText">0</span></strong></span>
        <span class="stat">Health: <strong><span id="healthText">100</span></strong></span>
        <span class="stat">Gold: <strong><span id="goldText">50</span></strong></span>
      </div>
      <div id="controls">
        <button id="button1">Go to store</button>
        <button id="button2">Go to cave</button>
        <button id="button3">Fight dragon</button>
      </div>

<!-- User Editable Region -->

      <div id="monsterStats">
        <span class="stat">Monster Name: 
          <strong></strong>
          <span id="monsterName">
            Health: 
            <strong></strong></span>
        </span>
        <span class="stat" id="mosterHealth: "></span>

      </div>

<!-- User Editable Region -->

      <div id="text"></div>
    </div>
    <script src="./script.js"></script>
  </body>
</html>
/* file: script.js */
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];

const button1 = document.querySelector("#button1");
const button2 = document.querySelector("#button2");
const button3 = document.querySelector("#button3");

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36

Challenge Information:

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

What are the instructions for this step?

Place your your id’s span tags between the strong tags.
@ianmccully

1 Like
RPG - Dragon Repeller
XP: 0 Health: 100 Gold: 50
Go to store Go to cave Fight dragon
Monster Name:
        <strong></strong></span>
    </span>
    <span class="stat" id="mosterHealth: ">Health: 
      <strong><span></span></strong>
    </span>

  </div>

still not passing thanks again for all your help, appreciated

Monster Name:
        <strong></strong></span>
    </span>
    <span class="stat" id="mosterHealth: ">Health: 
      <strong><span></span></strong>
    </span>

  </div>
Monster Name:
    </span>
    <span class="stat" id="monsterHealth">Health: <strong>
      <span id="monsterHealth"></span>
    </strong>

    </span>

  </div>

i got it thanks again for all your help i just took it one thing at a time and noticed that it is the inner span that you need to put the id for monsterName and health.

Ian

Your welcome, that’s good. Mark the solution if you have done your challenge.
@ianmccully

1 Like

Thanks again didn’t know you needed to mark solution but will from now on thanks

Ian

You marked my formal words as a solution. I said when you found a post from anyone as your solution, mark it as a solution. That can help others searching for solution in same topics. Thanks
@ianmccully

Monster Name: Health:
    </span>

  </div>
Monster Name: Health:
    </span>

  </div>

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