Question: Help Please! Looking for a good and detailed explanation for concrete understanding on the entirety of the code! I am here to learn! PLEASE USE

Help Please! Looking for a good and detailed explanation for concrete understanding on the entirety of the code! I am here to learn!

PLEASE USE JS

  • 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.

Use for while/while/lets/message prompts

Please show outputs

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!