getAllWords(prefix = '', node = this, words = [], string = '') {
    if (node.isWord) {
      words.push(`${prefix}${string}`);
    }

    for (const char of Object.keys(node.children)) {
      this.getAllWords(prefix, node.children[char], words, `${string}${char}`);
    }

    return words;
  }
Returns all the words from the current `node`.
Uses backtracking.

@param {string} prefix - The prefix to append to each word.
@param {string} node - Current node to start backtracking.
@param {string[]} words - Accumulated words.
@param {string} string - Current string.