Just a few weeks until the 2021 JavaScript Full-Stack Bootcamp opens.
Signup to the waiting list!


Use a combination of Math.floor() and Math.random().

This simple one line of code will return you a number between 1 and 6 (both included):

Math.floor(Math.random() * 6 + 1)

There are 6 possible outcomes here: 1, 2, 3, 4, 5, 6.



The 2021 JavaScript Full-Stack Bootcamp will start at the end of March 2021. Don't miss this opportunity, signup to the waiting list!

More js tutorials: