Error message parse


Why do I get the error message of Cannot parse given error object when I try to run this Javascript code in replit?
Current behavior:

Desired behavior

Repl link:

let xp=0;
let health=100;
let gold=50;
let currentWeapon=0;
let fightening;
let monsterHealth;
let inventory=["stick"];

const button1.querySelector("#button1");
const button2.querySelector("#button2");
const button3.querySelector("#button3");
const text=document.querySelector("#text");
const xpText=document.querySelector("#xpText");
const goldText=document.querySelector("goldText");
const monsterStats=document.querySelector("#monsterStats");
const monsterNameText=document.querySelector("#monsterName");
const monsterHealthText=document.querySelector("#monsterHealth");


function goStore() {
     console.log("Going to store.")

function goCave() {
     console.log("Going to cave.")

function fightDragon() {
  console.log("fightening Dragon")

:wave: Hey @JohnSterianos, welcome to the forums!

Can you please provide a link to the Repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like