Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js random

function randint(low:number, max?:number) {
  return Math.floor(Math.random() * 10) % (max ?? low) + (max ? low : 0);
}
Source by forum.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #js #random
ADD COMMENT
Topic
Name
4+4 =