Created
June 13, 2018 06:00
-
-
Save niinpatel/cd911b23bcf86cda434b54a1515f4b92 to your computer and use it in GitHub Desktop.
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
console.log(simulateGame(1000, toSwitch = true)); // play 1000 times, switch the door. Print how many times won. | |
console.log(simulateGame(1000, toSwitch = false)); // play 1000 times, don't switch the door. Print how many times won. | |
/* Output of first line will be close to 666 while that of second will be close to 333. */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment