Y
Hacker News
new
|
ask
|
show
|
jobs
by
simonkagedal
1072 days ago
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’)