Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

JS random number

Math.random() 


// Or something between 0 and 9:
Math.floor(Math.random() * 10)

// You can even make functions:
function random(min, max){return Math.floor(Math.random() * (max - min)) + min}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #JS #random #number
ADD COMMENT
Topic
Name
1+5 =