Skip to content

Commit

Permalink
Added cointosser.js
Browse files Browse the repository at this point in the history
  • Loading branch information
toclean authored and ErickSimoes committed Nov 1, 2020
1 parent d0b5078 commit 47c6e6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions coin tosser/cointosser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function coinToss() {
const rand = Math.round(Math.random());

console.log(rand === 0 ? 'heads!' : 'tails!');
}

coinToss();

0 comments on commit 47c6e6c

Please sign in to comment.