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

Tell us what’s happening:

Your first span element should be wrapped around the text 0…What is the error in first line of code

Your code so far

<!-- file: index.html -->

<!-- User Editable Region -->

<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>


<!-- User Editable Region -->

/* file: script.js */
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];

Your browser information:

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

Challenge Information:

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

remove the spaces here to pass

same goes for these two

Also, I have created an issue for it here because technically you go it right, but the test don’t account for those spaces

1 Like

Still not solved

You haven’t removed the spaces here

1 Like