Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

random number generator javascript

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
ADD COMMENT
Topic
Name
3+9 =