Tell us what’s happening:
I dont know why my code isnt working. Ive used Math.floor and Math.random as well and also, included the +1 at the end.
Your code so far
<!-- file: index.html -->
/* file: script.js */
// User Editable Region
function defeatMonster() {
gold += monsters[fighting].level + Math.floor(* 6.7);
}
// User Editable Region
/* file: styles.css */
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 130