Answers for "flip a coin javascript"

1

flip a coin javascript

function coinFlip() {
    return (Math.floor(Math.random() * 2) == 0) ? 'heads' : 'tails';
}
Posted by: Guest on January-09-2020
1

flip a coin javascript

function coinFlip() {
    return Math.floor(Math.random() * 2);
}
Posted by: Guest on January-09-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language