addWord (word) {
    let curr = this;

    for (let char of word) {
      if (!curr.children[char]) curr.children[char] = new WordDictionary();
      curr = curr.children[char];
    }

    curr.isWord = true;
  }
Adds a word into the data structure.
@param {string} word
@return {void}