Skip to content

Latest commit

 

History

History
19 lines (15 loc) · 691 Bytes

File metadata and controls

19 lines (15 loc) · 691 Bytes

Create a dictionary

  1. Choose a data structure for your dictionary
  2. Implement the addEntry function to store items in the dictionary.
  3. Implement a new function getEntry to return and entry given a new word it should return both the word and definition.
  4. Implement a new function startsWith to return a new dictionary containing all the entries with the word starting with that string. It must be case insensitive.
  5. Implement a new function groupByLength to return the words of the dictionary grouped by the length i.e.:
  {
    "3": ["cat", "pen", "car"],
    "4": ["boat", "bike"],
    "5": ["Bruno"],
  }

Código

create-dictionary.ts