From 6fb735eb09740380d77f14d1fa87e2ab795c1c3a Mon Sep 17 00:00:00 2001 From: Angelos Chalaris Date: Fri, 19 Oct 2018 08:36:58 +0300 Subject: [PATCH] Update toTitleCase.md --- snippets/toTitleCase.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/snippets/toTitleCase.md b/snippets/toTitleCase.md index 2108dddbd..2ae492d78 100644 --- a/snippets/toTitleCase.md +++ b/snippets/toTitleCase.md @@ -2,10 +2,7 @@ Converts a string to title case. -The algorithm featured here breaks down as follows: -1. Break the string into words, using a [Regular Expression](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions) -2. Capitalize each of them -3. Stich them back together, using the whitespace `' '` character as a separator +Break the string into words, using a regexp, and combine them capitalizing the first letter of each word and adding a whitespace between them. ```js const toTitleCase = str => str