Hello. Something is wrong in my code. Please help me.
function getMonsterAttackValue(level, xp) {
const hit = (level * 5) - Math.floor(Math.random() * xp);
console.log(hit);
return hit;
}
Your code so far
<!-- file: index.html -->
/* file: styles.css */
/* file: script.js */
// User Editable Region
function getMonsterAttackValue(level, xp) {
const hit = (level * 5) - Math.floor(Math.random() * xp);
console.log(hit);
return hit;
}
// 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/128.0.0.0 Safari/537.36 OPR/114.0.0.0
Challenge Information:
Learn Basic JavaScript by Building a Role Playing Game - Step 148
You seem to have changed what was there originally in the hit variable. Reset the lesson to how it was and try again. just put return hit and remove console log. There should not be any other changes.
Thanks, it is a real solution of the problem.I had a basic and advanced understanding of algebra, geometry, and the basics of analysis in mathematics, but I was confused by an equation that I wanted to solve using two conventional mathematical methods.