Update javascript guide
Add self-documentation to js styleguide