re: How do you do random? VIEW POST

FULL DISCUSSION
 
const random = (max, min=0) => Math.floor(Math.random() * (max - min)) + min

I wish JS had a more inuitive means of doing random, a built in RandInt function like Python has. Ah well.

Still beats having to make an entire object just for a random number Java.

code of conduct - report abuse