Answers for "capitileze the first letter of each word by js"

3

javascript uppercase first character of each word

const uppercaseWords = str => str.replace(/^(.)|\s+(.)/g, c => c.toUpperCase());

// Example
uppercaseWords('hello world');      // 'Hello World'
Posted by: Guest on July-03-2020

Code answers related to "capitileze the first letter of each word by js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language