Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

return first letter of string javascript in uppercase

function capitalizeFirstLetter(string) {
  return string.charAt(0).toUpperCase() + string.slice(1);
}

console.log(capitalizeFirstLetter('foo')); // Foo
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #return #letter #string #javascript #uppercase
ADD COMMENT
Topic
Name
2+6 =