Skip to content

Instantly share code, notes, and snippets.

@DennyScott
Created July 12, 2019 04:51
Show Gist options
  • Save DennyScott/925d4b12f81f94549ea9f10e7dde9643 to your computer and use it in GitHub Desktop.
Save DennyScott/925d4b12f81f94549ea9f10e7dde9643 to your computer and use it in GitHub Desktop.
function getUserForPhoneDirectory(person) {
const firstName = person?.firstName;
const lastName = person?.lastName;
const phoneNumber = person?.contact?.phoneNumber;
if(firstName && lastName && phoneNumber) {
return `${firstName} ${lastName} - ${phoneNumber}`
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment