Skip to content

Instantly share code, notes, and snippets.

@tigerclaw-az
Created May 28, 2014 17:46
Show Gist options
  • Save tigerclaw-az/9e03e5302117b5dd67bc to your computer and use it in GitHub Desktop.
Save tigerclaw-az/9e03e5302117b5dd67bc to your computer and use it in GitHub Desktop.
Find Your Villain Name - Solution for Kata http://www.codewars.com/kata/536c00e21da4dc0a0700128b
function getVillainName(birthday){
return "The " +
["Evil","Vile","Cruel","Trashy","Despicable","Embarrassing","Disreputable","Atrocious","Twirling","Orange","Terrifying","Awkward"]
[birthday.getMonth()] + ' ' +
["Mustache","Pickle","Hood Ornament","Raisin","Recycling Bin","Potato","Tomato","House Cat","Teaspoon","Laundry Basket"]
[(birthday.getDate()+'').substr(-1)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment