Skip to content

Glossary: Algorithms Beyond the Basics in JavaScript

XOR (exclusive or)

Also written: exclusive or, ^

A bit operator that gives 1 where two bits differ. Because `x ^ x` is 0, XORing a list of order IDs cancels every pair and leaves the one ID that appears only once.

Where the book teaches it

Related terms

Bit operators