Yet another JavaScript implementation

This is a very straightforward and easy to follow implementation
Merge pull request #142 from mohsen1/patch-1

Yet another JavaScript implementation