Learn Basic JavaScript by Building a Role Playing Game - Step 124

Tell us what’s happening:

I think my solution is correct. I don’t understand why the tests don’t pass.

Your code so far

<!-- file: index.html -->

/* file: script.js */
// User Editable Region

monsterHealth -= weapons[currentWeaponIndex].power + Math.floor(Math.random() * xp) + 1;

// User Editable Region
/* file: styles.css */

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/132.0.0.0 Safari/537.36

Challenge Information:

Learn Basic JavaScript by Building a Role Playing Game - Step 124

Code is good, passes for me…

You can reset and try again, you may have accidentally changed another part of the code, like the closing bracket on the previous clause or something like this.