Consider following snippet:
 var a = -1; var b = 0.25; alert( a == ~b^0 ); 
What will be shown in alert box?
Explanation
Bitwise operators have lower priority than logical. That Is Why
 a == ~b^0 
equivalent
 (a == ~b) ^ 0 
.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback