function firstCapitalLetter(name){ return name[0].slice('').toUpperCase() + name.slice(1).toLowerCase() } console.log(firstCapitalLetter('front '))