Skip to content

Latest commit

 

History

History
7 lines (5 loc) · 180 Bytes

capitalize_every_word.md

File metadata and controls

7 lines (5 loc) · 180 Bytes

Capitialize every word

const capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperCase());

capitalizeEveryWord('hello world!'); // 'Hello World!'