XOR and XNOR Implementation Using JavaScript

XOR Implementation:

Conceptual representation of XOR using Truth Table:
A XOR B = O/P
T XOR T = F
F XOR T = T
T XOR F = T
F XOR F = F

JavaScript Implementation:

Solution: Boolean(A ^ B)
Alternate: (A || B) && (!A || !B)


XNOR Implementation:

Conceptual representation of XNOR using Truth Table:
A XNOR B = O/P
T XNOR T = T
F XNOR T = F
T XNOR F = F
F XNOR F = T

JavaScript Implementation:

Solution: Boolean(!(A ^ B))
Alternate: (A && B) || (!A && !B)