Adding Symbol.iterator would allow iterating over the trie object using for...of and also return an array value using Array.from(trie).
In theory, this would allow users to get the orignal (order not guaranteed) array passed to the trie (unless any character is added/removed)
Adding Symbol.iterator would allow iterating over the trie object using
for...ofand also return an array value usingArray.from(trie).In theory, this would allow users to get the orignal (order not guaranteed) array passed to the trie (unless any character is added/removed)