I assume that technically this is optimization, but not the one that I recommend you do manually. a minifier will do it for you.
It just returns a boolean value.
!0 == true // because 1 is true, 0 is false, so NOT 0 is true.
!1 == false // same as above logic but flipped.
source
share