Keyword consistency in capitalize-first-letter-of-every-word

This commit is contained in:
Angelos Chalaris
2017-12-12 15:43:03 +02:00
parent cb7283ca56
commit fa83aa07bd
2 changed files with 2 additions and 2 deletions

View File

@ -3,5 +3,5 @@
Use `replace()` to match the first character of each word and `toUpperCase()` to capitalize it.
```js
var capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperCase());
const capitalizeEveryWord = str => str.replace(/\b[a-z]/g, char => char.toUpperCase());
```