Created
April 8, 2021 12:54
-
-
Save jogilvyt/22f1628d4c2853df1113f8e28096fde0 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 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