comment on what my javascript does