Skip to content

Instantly share code, notes, and snippets.

@Hillsie
Forked from jogilvyt/rhyming-slang-three.js
Created August 10, 2021 07:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Hillsie/8106d45e349e5d74f9a6ab33b86b38f6 to your computer and use it in GitHub Desktop.
Save Hillsie/8106d45e349e5d74f9a6ab33b86b38f6 to your computer and use it in GitHub Desktop.
function getTranslationMap(rhyme) {
const rhymes = {
"apples and pears": "Stairs",
"hampstead heath": "Teeth",
"loaf of bread": "Head",
"pork pies": "Lies",
"whistle and flute": "Suit",
};
return rhymes[rhyme.toLowerCase()] ?? "Rhyme not found";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment