TypeScript

A collection of 8 posts

Using Generator Functions as Iterators

Using Generator Functions as Iterators

If you're getting a little more advanced in your JavaScript, you may have started using the [Symbol.iterator] to make your objects iterable. Using a generator function allows for much more idiomatic looking code and saves you from having to return an object that conforms to the iterable protocol.

Close You've successfully subscribed to Snowfrog's blog.
Close Great! You've successfully signed up.
Close Welcome back! You've successfully signed in.
Close Success! Your account is fully activated, you now have access to all content.