Skip to content

Instantly share code, notes, and snippets.

@collardeau
Last active November 23, 2015 16:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save collardeau/9e8dc9d01392bedf6b8d to your computer and use it in GitHub Desktop.
Save collardeau/9e8dc9d01392bedf6b8d to your computer and use it in GitHub Desktop.
const getFirstName = name => {
if(name === null) return null; // new
return name.split(" ")[1];
}
const getFirstLetter = word => {
if(word === null) return null; // new
return word[0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment