Skip to content

Instantly share code, notes, and snippets.

@jogilvyt
Created April 8, 2021 12:54
Show Gist options
  • Select an option

  • Save jogilvyt/22f1628d4c2853df1113f8e28096fde0 to your computer and use it in GitHub Desktop.

Select an option

Save jogilvyt/22f1628d4c2853df1113f8e28096fde0 to your computer and use it in GitHub Desktop.

Revisions

  1. jogilvyt created this gist Apr 8, 2021.
    11 changes: 11 additions & 0 deletions rhyming-slang-three.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    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";
    }