Created
September 2, 2018 16:42
-
-
Save elliotaplant/993fec7cc337a6f9a52be6efa91d7a99 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 kurekTheSlimyToad() { | |
function place1RandomChoice() { | |
let place1Random = Math.floor(Math.random() * 6); | |
switch (place1Random) { | |
case 0: | |
return 'lord'; | |
case 1: | |
return 'master'; | |
case 2: | |
return 'slimiest'; | |
case 3: | |
return 'swapiest'; | |
case 4: | |
return 'grand toad'; | |
case 5: | |
return 'swampy boy'; | |
} | |
return place1RandomChoice(); | |
}; | |
function place2RandomChoice() { | |
let place2Random = Math.floor(Math.random() * 6); | |
switch (place2Random) { | |
case 0: | |
return 'slimy'; | |
case 1: | |
return 'swamply'; | |
case 2: | |
return 'toadly'; | |
case 3: | |
return 'ribbeting'; | |
case 4: | |
return 'croaking'; | |
case 5: | |
return 'fly eating'; | |
} | |
return place2RandomChoice(); | |
}; | |
function place3RandomChoice() { | |
let place3Random = Math.floor(Math.random() * 4); | |
switch (place3Random) { | |
case 0: | |
return 'toads'; | |
case 1: | |
return 'pledges'; | |
case 2: | |
return 'toads'; | |
case 3: | |
return 'basement dwellers'; | |
} | |
return place3RandomChoice(); | |
}; | |
return (`Kurek, ${place1RandomChoice()} of the ${place2RandomChoice()} ${place3RandomChoice()}`) | |
}; | |
console.log(kurekTheSlimyToad()); | |
console.log(kurekTheSlimyToad()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment