Skip to content

Instantly share code, notes, and snippets.

View IGZalejandrocuerdo's full-sized avatar

IGZalejandrocuerdo

View GitHub Profile
'use strict';
let convert = (str) => {
return str
.trim()
.split(/ +/)
.reduce((acc, word) => {
return (acc + ' ' + word[0].toUpperCase() + word.slice(1).toLowerCase()).trim();
}, '');
}