Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

capitalize first letter javascript

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

console.log(capitalizeFirstLetter('foo bar bag')); // Foo
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #capitalize #letter #javascript
ADD COMMENT
Topic
Name
1+3 =