A Reusable and Practical Use for JavaScript Generators (Part-1)

Alfie
The Solutionist
Published in
5 min readJan 7, 2021

--

Just when you thought the kid was done showing you tricks

JavaScript has gotten a lot of bad press over the years, yet it is still the most dominant web programming language. There was even a book made to highlight only “The good parts”, which assumed that it had many bad parts.

About a month into our relationship I quickly realized that between JavaScript and I, there was no love, but I recognized her power and allure.

I started going out with JavaScript in 2006. Back then I was madly in love with C#, but we were having a rough patch so I decided to test the waters… so to speak. About a month into our relationship, I quickly realized that between JavaScript and I there was no love, but I recognized her power and allure.

With the introduction of Node.js, JavaScript was now a language that could be used not only on the frontend but also on the backend: the term for this is “isomorphic”. This cemented our relationship and ever since then, I have been using JavaScript to build applications.

Recently, I wrote a small framework in JavaScript that used Generators to build a kind of “assembly line”. Part II of this article will implement a starter…

--

--

Alfie
The Solutionist

Computer scientist with a Master’s in Analytics. I gather knowledge and share it through writing. If you are one of the curious then join me.