Skip to content

Instantly share code, notes, and snippets.

@crs1138
Last active July 5, 2023 05:46
Show Gist options
  • Save crs1138/882ce81cc3eb34a5cd954ffb0e60b591 to your computer and use it in GitHub Desktop.
Save crs1138/882ce81cc3eb34a5cd954ffb0e60b591 to your computer and use it in GitHub Desktop.
Generate random integer between limits
export function randomInt(max, min = 0) {
return Math.round(Math.random() * (max - min) + min)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment