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

Tell us what’s happening:

i am unable to type the logical OR operater on my keyboard , how do i go about it?

Your code so far

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

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

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

// User Editable Region
/* file: styles.css */

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 Edg/127.0.0.0

Challenge Information:

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

Hi @eduguvasu

Try to copy and paste this: ||

Also, the second value needs some work.

The player should hit if either Math.random() > .2 or if the player’s health is less than 20 .

Happy coding

1 Like