Hi guys, my code is :
function isMonsterHit() {
return Math.random() > .2;
health > Math.random() > .2 || health < 20;
}
and this what is asking :
The player should hit if either Math.random() > .2
or if the player’s health is less than 20
.
At the end of your return
statement, use the logical OR operator ||
and check if health
is less than 20
.
and this is what shows after chekingk my code:
Your function should return the result of the comparison Math.random() > .2
or `health < 20
whats i am doing wrong ?