Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js random int

function getRandomInt(min, max) {
    min = Math.ceil(min);
    max = Math.floor(max);
    return Math.floor(Math.random() * (max - min + 1)) + min;
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #random #int
ADD COMMENT
Topic
Name
5+6 =