Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is entirely unneccessary. An == expression will always evaluate to 1 or 0. The !!x trick can be useful in some other situations, though.

Here’s a thing you could do (but I don’t know why):

+= !(c-’s’) - !(c-’p’)



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

Search: