Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

generate random number js

function getRandomIntInclusive(min, max) {
  min = Math.ceil(min);
  max = Math.floor(max);
  return Math.floor(Math.random() * (max - min + 1)) + min;
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #generate #random #number #js
ADD COMMENT
Topic
Name
8+7 =