JavaScript Deep Dives

JavaScript: Capitalize First Letter of Each Word in a String

JavaScript: Capitalize First Letter of Each Word in a String
Comments (1)
  1. AvatarDmitry says:

    Hey, nice article, there is a small type though… In the 3rd method it should be square brackets:

    let regex = /[^|\s]\S/g

    otherwise each word after the space begins with a space 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

Get matched modal

Find the best bootcamp for you

Our matching algorithm will connect you to job training programs that match your schedule, finances, and skill level.