Hello friends! There’s a program that I can’t quite figure out how to code. I am very new to JavaScript and I am currently on decision making. I just started learning how to use booleans. The program I need to write is:
Create a program named Lottery.html that generates three random numbers, each between 1 and 10 inclusive. Allow the user to guess three numbers (ensure they are valid). Compare each of the user’s guesses to the three random numbers and display a message that includes the user’s guess, the three random numbers, and the amount of money the user has won, based on the information displayed below. Ensure the application accommodates repeating digits. For example if a user guesses 1,2 and 3 and the randomly generated digits are 1,1 and 1, do not give the user credits for the three correct guesses- just one.
One match = $100
two matches = $200
three matches = $500
no matches = $0
Anyone who could help me with this will be a life saver! I’ve been stuck trying to figure this out for such a long time.