DEV Community

Sam Clark
Sam Clark

Posted on • Updated on


Horrible Howto - Get that Middle Initial

I really just wanted to post my first post, and I had just made this snippet, so I decided to post it here! What the hay!

const formatMiddleInitial = middleName => (middleName ? middleName.charAt(0).toUpperCase() : null);
console.log('stuff', formatMiddleInitial('clark hark'));

Latest comments (0)

50 CLI Tools You Can't Live Without

The top 50 must-have CLI tools, including some scripts to help you automate the installation and updating of these tools on various systems/distros.