Stuck on step 34, hoping someone can help me out here.
Getting error:
SyntaxError: unknown: Identifier ‘text’ has already been declared. (20:6) 18 | let monsterName; 19 | > 20 | const text = document.querySelector(“#text”); | ^ 21 | const xpText = document.querySelector(“#xpText”); 22 | const healthText = document.querySelector(“#healthText”); 23 | const goldText = document.querySelector(“#goldText”);
Here is my code so far:
let xp = 0;
let health = 100;
let gold = 50;
let currentWeapon = 0;
let fighting;
let monsterHealth;
let inventory = ["stick"];
const button1 = document.querySelector("#button1");
const button2 = document.querySelector("#button2");
const button3 = document.querySelector("#button3");
let text;
let xpText;
let healthText;
let goldText;
let monsterStats;
let monsterName;
const text = document.querySelector("#text");
const xpText = document.querySelector("#xpText");
const healthText = document.querySelector("#healthText");
const goldText = document.querySelector("#goldText");
const monsterStats = document.querySelector("#monsterStats");
const monsterName = document.querySelector("#monsterName");