Articles for: JavaScript

Creating An Iterator Function By Scratch in JavaScript

In this JavaScript code snippet, I show how to create a custom iterator function. Generally, you're probably going to use a generator function when you want to step through a data stream, but today I'm going to jot down a little code note about creating a custom iterator in JavaScript easily, thanks to closure.

Posted on Thursday, September 20, 2018