Created
September 26, 2020 08:47
-
-
Save anova/98ccd12bf488230f821c0afe983ece8d to your computer and use it in GitHub Desktop.
Name Surname -> N. S.
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
function shortenName(name) { | |
return name.split(' ').map(word => `${word.charAt(0)}.`).join(' '); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment