assignment 2.2 Exclusive OR

This is what I came up with on my own. Below is what I understand Martin showing in class.

var preferredName = function (firstName, lastName);
     return (!firstName === !lastName) ? false : (firstName || lastName) };