Yet another JavaScript implementation

This is a very straightforward and easy to follow implementation