Created
January 15, 2021 07:59
-
-
Save Alfxjx/604aadb271ca288f484adc0d8c0d24e6 to your computer and use it in GitHub Desktop.
roll a coin function
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
const roll = () => { | |
return (Math.random()*10).toFixed(0) % 2 === 0?"go":"stop"; | |
} | |
console.log(roll()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment