This is an autocomplete prefix trie with insert, suggest, and select functions built in.
Insert allows you to create and add a new word to the trie if it doesn't already exist.
Suggest returns an array of words based on the current letters inserted. i.e - if you insert 'ca' and have a current trie populated with the words car, cab, and cat, suggest will return [cab, car, cat].
Select allows you to select a word that is in the trie and return it at the front of subsequent returned suggest arrays.