Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Javascript Capitalize First Letter

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

console.log(capitalizeFirstLetter('foo')); // Foo
 Run code snippet
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Javascript #Capitalize #First #Letter
ADD COMMENT
Topic
Name
1+9 =