JSFiddle - React, Tailwind, and code Playground

by akang2

JavaScript

//Activity 3.4 Roll the dice!

//The Math.random function should return a value between 0 and 1. It's very important to understand that it's a value BETWEEN 0 and 1, it will never give you 0 or 1. 
Math.random();

//The Math.floor function will return a rounded DOWN (the floor is down on the ground) number from what you give it in the parenthese
Math.floor();

//So now imagine what this number will be!
console.log(Math.floor(Math.random() * 6 + 1));