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

Tell us what’s happening:

Hi there

Can someone help with this please?

Kind regards
Iskren

Your code so far

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

/* file: styles.css */

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

function isMonsterHit() {
  health < 20 || health > 20
  return Math.random() > .2;
}

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.4.1 Safari/605.1.15

Challenge Information:

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

Hi @iskren500

At the end of your return statement, use the logical OR operator || and check if health is less than 20 .

Please read the instructions carefully on what you are required to do for this step.

Happy coding

thats what I did with the health > 20 || health < 20

Your code also includes health greater than 20.
That was in the example.

Your return statement end with .2
after that you need to add OR operator and health less 20.

1 Like

great thanks, appreciate your help

1 Like