Tell us what’s happening:
I’m not sure how to add the weapon… the only thing I could think of is if it’s a ++ thing to increment through the array?
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function buyWeapon() {
if (gold >= 30) {
gold -= 30;
let currentWeapon = weapons[0];
currentWeapon += weapons[1];
}
}
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 83