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

It's just the not "!" operator twice.

The first NOT operator (from right to left) casts the following operand to the boolean primitve type and negates the value.

The second NOT operator reverses the truth value of the boolean, in order to regain the original truthiness.

!self.WebAssembly; -> false if self.WebAssembly is truthy (eg. object exists), true otherwise

!!self.WebAssembly; = !(!self.WebAssembly;) = !(false|true) -> true if WebAssembly is defined, false otherwise.



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

Search: