Skip to content

Instantly share code, notes, and snippets.

@niinpatel
Created June 13, 2018 05:54
Show Gist options
  • Save niinpatel/4cb1f7caf6f2e3f766e0d55b46e603b5 to your computer and use it in GitHub Desktop.
Save niinpatel/4cb1f7caf6f2e3f766e0d55b46e603b5 to your computer and use it in GitHub Desktop.
function simulateGame(num, toSwitch) {
let gamesWon = 0;
for(let i = 0; i < num; i++){
gamesWon += playMontyHall(toSwitch)
}
return gamesWon
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment