Category: JavaScript

More on TDD

Tutorial 2: Linked List This is the second tutorial in a series dealing with Test Driven Development (TDD) in JavaScript using Mocha and Chai. In this tutorial, we will expand on the use of Chai and the concept of Test-Driven…

AMD JSONP Loader Module

Needed an AMD module for JSONP loading of scripts. The criteria, it had to be safe-ish, had to use promises conform to CommonJS Promises/A, specifically support Q, and work — gasp — without jQuery. I started with this article from…

Duff’s Device in JavaScript

We’re going to be discussing efficient JavaScript in some upcoming training sessions, and I wanted to get this code snippet out for discussion. Commonly, developers will process an array of values, calling some pre-defined function with this idion: var i=values.length;…