Hacker News new | past | comments | ask | show | jobs | submit login
What does !-- do in JavaScript? (stackoverflow.com)
4 points by antoaravinth on Dec 21, 2015 | hide | past | favorite | 3 comments



It is interesting that this question spawned such criticism/discussion as to whether it should be done in Javascript or not, but not as to why the OP did not know such basic language operators in the first place.

Alright, he did not know them and hence asked (thats after all what a forum is there for) but then simply explain it and carry on. Discussing the "evilness" of basic negation and decrement operators is useless and counter-productive.


Calling a function exactly once after a group of operations have completed is a pretty common pattern in Node.


Right. Even in normal js world, I have seen people using + for converting their types to Number.




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

Search: