Skip to content

Instantly share code, notes, and snippets.

@faisaljama
faisaljama / xor.js
Created April 10, 2014 03:22 — forked from hankyates/xor.js
// Using a ternary operator. Implement an exclusive OR function called `preferredName` that has the following interface:
var FirstName,
LastName;
preferredName(FirstName, LastName);
// -> false
FirstName = 'Hank';