Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

random number generator javascript with range

function randomNumberGeneratorInRange(rangeStart, rangeEnd) {
   return Math.floor(Math.random() * (rangeStart - rangeEnd + 1) + rangeEnd);
}

console.log(`My random number: ${randomNumberGeneratorInRange(10, 50)}`);
Source by github.com #
 
PREVIOUS NEXT
Tagged: #random #number #generator #javascript #range
ADD COMMENT
Topic
Name
2+2 =