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

Tell us what’s happening:

Add the string " In your inventory you have: " - include the spaces at the beginning and the end.

Your code so far

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

/* file: script.js */
// User Editable Region

function buyWeapon() {
  if (gold >= 30) {
    gold -= 30;
    currentWeaponIndex++;
    goldText.innerText = gold;
    text.innerText += " In your inventory you have: <br>"; 
  
    let newWeapon = weapons[currentWeaponIndex].name;
    inventory.push(newWeapon);


// User Editable Region
/* file: styles.css */

Your browser information:

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

Challenge Information:

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

Hi Shail, welcome to fcc community.

You should reset to go back to the original code and try again.

This time, only add your code on line 96, and don’t make any change elsewhere.

And according to the instruction, there are no line break (<br>) at the end of the string: " In your inventory you have: "