In my last post, we used ES2015 generators to make a never-ending stream of zombies. A stream is great, but sometimes you need an array. My original approach for making an array of zombies wasn’t elegant, but comments on that post from Ege and Alan showed me a better way using another ES2015 feature. [more]…
try-catch-FAIL
Stories from the trenches of software development.
Month: <span>June 2017</span>
Making a Zombie Horde in JavaScript Using ES6 Generators
Zombies are fun. ES2015 is fun. You know what’s even more fun? ES2015 and zombies together! In this post, I’ll show you how I used ES2015 generators to make an infinite zombie horde. [more] Getting Started This sample should work fine in NodeJS 8+. Go grab it if you don’t have it already! Let’s make…