/* file: script.js */
// User Editable Region
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick", "dagger", "sword"];
inventory =="stick";
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 14
I am so sorry, I could not understand the above statement
Could you pls ease it for me by typing the specific code if possible
thank you so much
(sorry for the inconvenience)
No problem. In this step you have an array inventory with three values:
let inventory = ["stick", "dagger", "sword"];
Your task is to change it to have only one starting value “stick”.
So you need to remove “dagger” and a “sword”.
The result would look like: