Javascript Playground

Bonus advantage to this style of programming: easy to test. Building an automated test of the functions using values similar to those below and you would always know where the inevitable bug isn't.