Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Return A Random Number within a range of numbers

function randomRange(myMin, myMax) {
  return Math.floor(Math.random() * (myMax - myMin + 1) + myMin);
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Return #A #Random #Number #range #numbers
ADD COMMENT
Topic
Name
7+3 =