translate statcmp.py to javascript
Merge pull request #4864 from fkaelberer/statcmp.js

Translate statcmp.py to JavaScript