Created
March 4, 2016 09:22
-
-
Save thepauljones/271159cb0ee364373e28 to your computer and use it in GitHub Desktop.
Open sourced code to determine who in the team gets the overige tim tams after everyone has had one
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
var totalTimTamsinPack = 8; //For the Hellema brand | |
var people = ["fardau", "wilfred", "jeroen", "teun", "arjan", "erik", "paul"]; | |
var timtamsleftAfterEveryoneGetsOne = totalTimTamsinPack - people.length; | |
while(timtamsleftAfterEveryoneGetsOne-- > 0) | |
alert("The " + (timtamsleftAfterEveryoneGetsOne + 1 )+ "nd last tim tam goes to " + people[Math.floor(Math.random()*people.length)]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment