- Task We Re Creating An Application To Generate The Hoosier Lottery Numbers Using A For Loop And A While Loop You Will 1 (60.46 KiB) Viewed 78 times
Task: We're creating an application to generate the Hoosier Lottery numbers, using a for loop and a while loop. You will
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Task: We're creating an application to generate the Hoosier Lottery numbers, using a for loop and a while loop. You will
Task: We're creating an application to generate the Hoosier Lottery numbers, using a for loop and a while loop. You will have to think about how to generate random numbers between 1 and some upper limit, like 49... Create an algorithm and use this in your solution. As before, you can use console.log to log the number to the console. Part 1: Create a for loop that executes exactly 6 times. • In the body of the loop, generate a random number between 1 and 49, inclusive. • Save the random number to a string, using the same techniques we used for this week's example (times tables) When the loop exits, display the string in a heading on the web page. Part 2: • Create a while loop that executes exactly 6 times. • In the body of the loop, • generate a random number between 1 and 49, inclusive. Save the random number to a string, using the same techniques we used for this week's example (times tables) • When the loop exits, display the string in a heading on the web page.