function capitalizeFirstLetter(string) { return string.charAt(0).toUpperCase() ; } console.log(capitalizeFirstLetter('foo')); // Foo Run code snippetHide results