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

Tell us what’s happening:

i can’t find the mistake :slight_smile:

Change your inventory variable to be an array with the strings “stick” , “dagger” , and “sword”

Your code so far

<!-- file: index.html -->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="./styles.css">
    <title>RPG - Dragon Repeller</title>
    <script src="./script.js"></script>
  </head>
  <body>
    <div id="game">
    </div>
  </body>
</html>
/* file: script.js */

// User Editable Region

let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;xxx
let fighting;
let monsterHealth;
let inventory = ["stick", "dagger", "sword"];

// User Editable Region

Your browser information:

User Agent ist: Mozilla/5.0 (Windows NT 10.0; Win64; x64) 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 13

i don’t really see a difference to your code, but i just put in
let inventory = [“stick”, “dagger”, “sword”];
and it worked :man_shrugging:

I think it’s bugged, i even copy- paste yours and it still doesn’t work for me :frowning:

Hi there, that’s the issue

OMG!!! I love you haha thank you so much i was searching like crazy :joy:

1 Like

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