Javascript exercise I worked on while reading chapter 7 of the Eloquent Javascript book on http://eloquentjavascript.net/chapter7.html