Flip una moneda Javascript
function coinFlip() {
return (Math.floor(Math.random() * 2) == 0) ? 'heads' : 'tails';
}
Sleepy Shrike
function coinFlip() {
return (Math.floor(Math.random() * 2) == 0) ? 'heads' : 'tails';
}
function coinFlip() {
return Math.floor(Math.random() * 2);
}