Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js capitalize first letter of each word

const titleCase = title => title
    .split(/ /g).map(word =>
        `${word.substring(0,1).toUpperCase()}${word.substring(1)}`)
    .join(" ");
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #capitalize #letter #word
ADD COMMENT
Topic
Name
3+1 =