Added a fully functional JavaScript solution.

No state required (it's the Libertarian dream...).
Merge pull request #97 from chrisbouchard/master

Added a fully functional JavaScript solution.