Question: I am here to learn! Please comment on everything and explain in detail what is happening, I want to understand the code completely so that
I am here to learn! Please comment on everything and explain in detail what is happening, I want to understand the code completely so that I can repeat it on my own!
PLEASE SHOW YOUR OUTPUTS!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
javascript please
- Prompt the user to input the number of hits they are going to attempt to hit the dragon with up to 5.
- Have the user deal a random amount of damage, between 1 and the number they input, to the dragon. If the random number is above 5, have the user deal only 1 damage to the dragon.
- Then, have the dragon randomly deal either 1 damage or 2 damage to the user.
- Once the dragon takes 10 damage, the user wins.
- Once the user takes 5 damage, the user loses.
Would like to see condiitional statments, lets, else, while, for
Please explain in depth and show your outputs!
If you have answered this question before pass it on to someone else!
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
