From fa83aa07bd74c6c2fe425e20388de2eaaf37fb36 Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Tue, 12 Dec 2017 15:43:03 +0200 Subject: [PATCH] Keyword consistency in capitalize-first-letter-of-every-word --- README.md | 2 +- snippets/capitalize-first-letter-of-every-word.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c947a258d..44ffd891e 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ const average = arr => 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()); ``` ### Capitalize first letter diff --git a/snippets/capitalize-first-letter-of-every-word.md b/snippets/capitalize-first-letter-of-every-word.md index b1ce2d44a..6c93eecd4 100644 --- a/snippets/capitalize-first-letter-of-every-word.md +++ b/snippets/capitalize-first-letter-of-every-word.md @@ -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()); ```