Skip to content

Instantly share code, notes, and snippets.

@Woodsphreaker
Created October 19, 2017 01:54
Show Gist options
  • Save Woodsphreaker/8335ed81c4a54c04bb6ca7697a6e43d4 to your computer and use it in GitHub Desktop.
Save Woodsphreaker/8335ed81c4a54c04bb6ca7697a6e43d4 to your computer and use it in GitHub Desktop.
random
const random = ( min = 0, max = 10 ) => Math.floor( Math.random() * ( max - min ) + min )
console.log(random())
console.log(random( -10, 10 ))
console.log(random( 50, 250 ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment