The first two !! do a type conversion to binary. The third inverts the binary value. The combination lets you do a C-style conditional of "not that, whatever it is".
I wish I didn't know this, and I wish javascruff wasn't such a shitty language.
Top-level
The first two !! do a type conversion to binary. The third inverts the binary value. The combination lets you do a C-style conditional of "not that, whatever it is". I wish I didn't know this, and I wish javascruff wasn't such a shitty language. 4 comments
@artemesia before wasm engines had things like this to make javascript run faster by being able to make much more drastic optimisations @artemesia you try it??? it does the same thing as one exclamation point as far as a dev is concerned? |
@artemesia this isnt part of the language. this is an engine optimisation