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

function getMonsterAttackValue(level, xp) {
const hit = (level * 5) - (Math.floor(Math.random() * xp));
console.log(hit);
return hit;
}

You should have one parameter in your function.

1 Like