//Random Number Generation var n = Math.random(); console.log(n); //number will be between 0 and 0.9(to 16 decimal places) //this will give 0-6 s adding 1 to every answer gives the numbers on a dice //multiply by whatever range you need n = n * 6; n = Math.floor(n) +1; //called a pseudo random number generator