diff --git a/coin tosser/cointosser.js b/coin tosser/cointosser.js new file mode 100644 index 00000000..deb9c5a2 --- /dev/null +++ b/coin tosser/cointosser.js @@ -0,0 +1,7 @@ +function coinToss() { + const rand = Math.round(Math.random()); + + console.log(rand === 0 ? 'heads!' : 'tails!'); +} + +coinToss(); \ No newline at end of file