Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js random number

// You can make functions aswell 
function randomNum(min, max) {
	return Math.floor(Math.random() * (max - min)) + min; // You can remove the Math.floor if you don't want it to be an integer
}
Source by developer.mozilla.org #
 
PREVIOUS NEXT
Tagged: #js #random #number
ADD COMMENT
Topic
Name
1+5 =