Tag Archives: reduce

Eloquent Javascript ch.5 – Flattening

In which we are back in the saddle and have a success. After a “wait and reapply later” answer from Hack Reactor, I was discouraged and focused solely on a job hunt for three weeks. That effort continues, but I’m also coding again in preparation to reapply this summer. It feels good. At first I […]


loop through array in ES5

If you’re using an environment that supports the Array features of ES5 (directly or using a shim), you can use the new forEach function: var a = [“a”, “b”, “c”]; a.forEach(function(entry) { console.log(entry); }); forEach accepts an iterator function and, optionally, a value to use as this when calling that iterator function (not used above). The iterator function is called for each […]