Answers for "nodejs math random"

12

math.random js

Math.floor(Math.random() * 10);
Posted by: Guest on November-24-2019
0

js math random

var n = Math.random();
n = Math.floor((n * 6) + 1); // if you want your numbers to start at 1 and end at 6 
console.log(n);
Posted by: Guest on May-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language