Add new javascript example for checking array equality
Add cleanup to all javascript examples
* fix typos
* fix formatting
* use tab width of 2