Last active
January 20, 2021 19:12
-
-
Save bobdobbalina/4d4de78d83724831ef25ee17e53ba5b0 to your computer and use it in GitHub Desktop.
Javascript: Returning randomly true or false with the same 50% of probability
This file contains hidden or 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
| var randomBoolean = Math.random() >= 0.5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment