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

Tell us what’s happening:

My task is " Now create the isMonsterHit function. This will return a boolean value (true or false) to be used in your if statement. Return the result of the comparison Math.random() > .2 . "

And I wrote:
function isMonsterHit {
return Math.random() > .2;
}

What am I doing wrong?

Your code so far

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

/* file: styles.css */

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

function isMonsterHit {
return Math.random() > .2;
}

// 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/127.0.0.0 Safari/537.36 OPR/113.0.0.0

Challenge Information:

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

you forgot the parenthesis for the isMontsterHit parameters

1 Like

thank you for your help again!

1 Like