Last active
April 25, 2016 18:14
-
-
Save sheminusminus/4db5e41726c4d815cc88527444eebd68 to your computer and use it in GitHub Desktop.
This file contains 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
function myFunction() { | |
function firstGuy() { | |
return 'first one'; | |
} | |
function secondGuy() { | |
return 'second one'; | |
} | |
function thirdGuy() { | |
return 'third one'; | |
} | |
var possibilities = [firstGuy, secondGuy, thirdGuy]; | |
return possibilities[Math.floor((Math.random() * 3) + 1)](); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment