Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

uppercase each word javascript

const mySentence = "freeCodeCamp is an awesome resource";

const finalSentence = mySentence.replace(/(^w{1})|(s+w{1})/g, letter => letter.toUpperCase())

console.log(finalSentence)
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #uppercase #word #javascript
ADD COMMENT
Topic
Name
3+4 =