- If you found this article useful, you should subscribe to my feed (or get an e-mail). I'm also on Twitter and GitHub.
About the Author
Zach Leatherman is a Professional Front End Engineer. He loves building for the web, and has been contributing to the community through his blog since February 2007. Despite his propensity for software, he has a Bachelors degree in Computer Engineering and is currently on the User Experience Team at Union Pacific Railroad. The views expressed on this website do not represent the views of his employer.He enjoys spending time with his beautiful wife Traci and their two Great Danes, Roxie and Ella. They also have a cat, a rabbit, goldfish, and one or more tarantulas. Read more »


Logical XOR in JavaScript
Of course there wouldn’t be an XOR function in JavaScript when I needed one. So I googled around and found an implementation at How To Create. But it only took two arguments. So I rolled my own supporting a variable number of arguments. In my personal stuff, I’ve put it into a Math library under the YAHOO namespace, and you can decide if you want to do that on your own.
Usage: