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

Tell us what’s happening:

I am getting a prompt to add 1, but I have already added 1. I don’t know what to do here. Please help.

Your code so far

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

/* file: styles.css */

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

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

// User Editable Region

Your browser information:

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

Challenge Information:

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

hi there!
instructions asked you: to add a random number between 1 and the value of xp. recheck your code.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.