Iterables and Iterators in JavaScript

In this post, I go over the iterable and iterator protocols and show some examples of making your own objects iterable so that they can be used with the for…of loop or the spread operator. Read more

Similar

The Birth and Death of JavaScript

If you liked this, you might also like Execute Program: interactive courses on TypeScript, Modern JavaScript, SQL, regular expressions, and more. Each course is made up of hundreds of interactive code examples running live in your bro... (more…)

Read more »

The Case for Weak Dependencies in JavaScript

Earlier today, I was briefly entertaining the idea of writing a library to wrap and enhance querySelectorAll in certain ways. I thought I’d rather not introduce a Parsel dependency out of the box, but only use it to parse selectors properly when it’s avai... (more…)

Read more »