Hello,
I do not quite understan the insrtructions of step 124.
I have tried several combinations even though it does not seem too complicated.
Instructions:
Using these, you can generate a random number within a range. For example, this generates a random number between 1 and 5: Math.floor(Math.random() * 5) + 1;.
Following this pattern, use the addition operator (+) to add a random number between 1 and the value of xp to your monsterHealth -= weapons[currentWeaponIndex].power.
Thank you so much but… this is the response:
You should add the result of Math.floor(Math.random() * xp) + 1 to the result of weapons[currentWeapon].power .
Would it be possible to report this as a bug? Unless I misunderstand, parentheses are mathematically correct and shouldn’t affect the code unless placed incorrectly.
it could be reported as a bug, but to write tests that can catch all the variations, it becomes incresingly complex, and it’s something we tend not to do.