Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

How to get random no. without math.random() function

// Generate a number between 0 and 10, including 10
function generateRandomInteger(max) {
    return Math.floor(Math.random() * max) + 1;
}

var value4 = generateRandomInteger( enter a max value );
Source by www.udacity.com #
 
PREVIOUS NEXT
Tagged: #How #random #function
ADD COMMENT
Topic
Name
1+7 =