Step 152 Role Playing Game

Hello,

Anyone know what is wrong here please?

I have also tried putting brackets around the Math.random as well as putting the Math.random and return on separate lines…?

instructions are:

Step 152

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.

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

“Now create the isMonsterHit function.”

You left out one very important word in your function definition.

1 Like

thank you. If I don’t pick up on your hint, I should definitely not be doing this course! thanks very much.

1 Like