randomInt()
๐ฐ JS โฉ Functions โฉ Global โฉ
// โญ๏ธ syntax:
// randomInt(min, max)
// โญ๏ธ examples:
// randomInt(0, 255) // choose from 0 ... 255 (included)
export function randomInt(min, max) {
return Math.floor(Math.random()*(max-min+1)) + min;
}
Last updated
Was this helpful?