Is there a simple way to convert a string to title case? E.g. john smith becomes John Smith. I\'m not looking for something complicated like John R
john smith
John Smith
var result = 'this is very interesting'.replace(/\b[a-z]/g, (x) => x.toUpperCase()) console.log(result) // This Is Very Interesting