//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
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter