Hacker News new | comments | show | ask | jobs | submit login

For point 3, it might be worthwhile understanding what the ECMA standard says about automatic semi-colon insertion. It won't happen for the following:

  a = b
  ++c
This becomes:

  a = b;
  ++c;
and NOT:

  a = b++;
  c;
There are other, odd gotcha's, but this is the one being discussed.

I believe the issue with the bang (!) operator is that it's being considered as a binding de-reference of function objects. See here: https://mail.mozilla.org/pipermail/es-discuss/2010-July/0114...

Therefore, the problem with the code would be that an automatic semi-colon would not be inserted and the code, which is currently:

  clearMenus()
  !isActive && $parent.toggleClass('open')
Would become:

  clearMenus()!isActive && $parent.toggleClass('open');
Instead of:

  clearMenus();
  !isActive && $parent.toggleClass('open');
That was my understanding, at any rate.



Applications are open for YC Summer 2018

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: