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;
}
1 Like
“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
---solution code removed--
Hi, and welcome to the forum.
It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.
We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.
It was also marked as solved last year, so it’s unnecessary to add further to this thread.