Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Theme: Modify the following conditions in the JavaScript file: Change the multiplier on the die variable to 20, so that a random number is generated

Theme: Modify the following conditions in the JavaScript file:

    • Change the multiplier on the die variable to 20, so that a random number is generated from 1 to 20 with the Math.ceil and Math. random functions.
    • Add 10 additional else if statements right before the last else statement so that the values for 11 to 20 are covered for the die variable.
    • Change the title command text to represent your 20-sided file name.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

Heres how you can modify the JavaScript file based on the given conditions 1 Change the multiplier o... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Artificial Intelligence A Modern Approach

Authors: Stuart J. Russell and Peter Norvig

2nd Edition

8120323823, 9788120323827, 978-0137903955

More Books

Students also viewed these Programming questions

Question

discuss the use of exercise as an adjunct to therapy.

Answered: 1 week ago