Iterators are so useful, that it has now become one of JavaScript's core features. Generators were devised in order to facilitate the creation of iterators. Better yet, with generators, you can nest iterators, and yield a "flattened" result.
The binary search tree is a classic example of where "nested" iterators will be useful.
const BinarySearchTree = require('./bst.js');
const tree = new BinarySearchTree();
tree.insert(3, 'foo');
tree.insert(10, 'bar');
tree.insert(21, 'baz');
tree.insert(13, 'widgets');
tree.insert(12, 'foobar');
console.log([...tree]);