Skip to content

Instantly share code, notes, and snippets.

@imaginamundo
Created September 2, 2021 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save imaginamundo/c5c7d52b8cda7ddce9ddfc60346a4920 to your computer and use it in GitHub Desktop.
Save imaginamundo/c5c7d52b8cda7ddce9ddfc60346a4920 to your computer and use it in GitHub Desktop.
Function to generate a random number with start and end as arguments
function random(from = 0, to = 1) {
return Math.random() * (to - from) + from;
}
export default random;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment