Over the past few weeks (months?), I’ve been making a grand effort to learn as much as I can about javascript.  I’ve gotten my hands on a couple good books, read countless articles, and most recently, stumbled upon a very interesting blog post.  Rebecca Murphey (of yayQuery! fame) recently created a series of failing unit tests in javascript and made a nice node.js app from them (available on Github).  This provides a nice exercise for anyone wishing to assess their fundamental javascript skills.  Given the fact that I had no idea where I stood in terms of skill, I thought I’d give it a go.

I’m glad I did.  Not only was it a mild wake-up call, but a great introduction to some topics that I don’t see often in the real world – topics like partial functions & currying, closures, creating modules, and working with prototypes.  I’m not ashamed to say this took a better part of a Sunday afternoon, as it was quite rewarding to see that “100%” show up on the screen.  Some of the tests were ridiculously easy, some were challenging, and there were a few where I didn’t really know what I was supposed to do, but eventually got something working while sticking to the topic at hand.

I’ve uploaded a fork of the project to github with my completed answers.  More tests may be added into the future, so I’ll be able to simply pull them down and hack away.  It will also be nice for my future self to look back on this in a year or two and have a chuckle at the expense of my present self.