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

Tell us what’s happening:

Stuck on this point …Not able to get the solution from forum. Please help me to solve this step.

Your code so far

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

/* file: styles.css */

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

function isMonsterHit(){
  return result(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/109.0.0.0 Safari/537.36

Challenge Information:

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

Hi @azamshahzad090,

You want to return Math.random() > .2 which will pass a boolean of “true” or “false” when called depending on Math.random(). The result() function is not needed. I hope this helps. Happy coding!