Created
September 2, 2021 19:03
-
-
Save imaginamundo/c5c7d52b8cda7ddce9ddfc60346a4920 to your computer and use it in GitHub Desktop.
Function to generate a random number with start and end as arguments
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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