Last active
January 28, 2018 15:38
-
-
Save xkrsz/961a90816a4bb6d9b7079c91ad3599ab to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const greet = (name = ‘Mark’, surname = ‘Zuckerberg’, sex = ‘male’) => { | |
const title = sex === ‘male’ ? ‘Mr.’ : ‘Ms.’ | |
return `Greetings, ${title} ${name} ${surname}` | |
} | |
greet() // ‘Greetings, Mr. Mark Zuckerberg’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment