Question: In HTML/JavaScript Create a web page that simulates a lottery. The JavaScript program will create an array of six numbers between 1 and 40 (inclusive).

In HTML/JavaScript

Create a web page that simulates a lottery. The JavaScript program will create an array of six numbers between 1 and 40 (inclusive). The numbers will be generated randomly. Be sure to check that the array does not contain duplicates . Sort the array in ascending order. Next, have the user enter the six numbers from an imaginary lottery ticket the user purchased. Sort, if necessary. Check to see how much, if anything, the user has won, using the following table of possible winnings:

In HTML/JavaScript Create a web page that simulates a lottery. The JavaScript

The page should display the winning number, the users number, the number of matches (if any) and the winnings (if any). Save the page with the filename lottery.html. Submit your work as instructed by your teacher.

Number of Matches Amount of Winnings S 5.00 4 $ 50.00 100.00 100,000.00

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!