Fiddle based on Christian Johansen's examples discussed in chapter 1 of his book, Test-Driven JavaScript Development.
app.js | readme