javasript string first words to upper case

Solutions on MaxInterview for javasript string first words to upper case by the best coders in the world

showing results for - "javasript string first words to upper case"
Emma
28 Mar 2018
1function titleCase(str) {
2  return str.toLowerCase().replace(/(^|\s)\S/g, L => L.toUpperCase());
3}
4