Posted By

gotofritz on 07/14/10


Tagged

logical xor


Versions (?)

Logical XOR in Javascript


 / Published in: JavaScript
 

There's no logical XOR in Javascript - no a ^^ b. Here's a workaround - note that null, undefined, '', 0 all count as 'false'

  1. (!a != !b )

Report this snippet  

You need to login to post a comment.