Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function sample(coin) {
- var heads = 0;
- for (let i = 0; i < 100000; i++) {
- coin() === true ? heads++ : heads;
- }
- return heads / 100000;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement