From 13b3e3fa9ba6f5dcbc40e5bdaab48cc57dd3a8f5 Mon Sep 17 00:00:00 2001 From: Joe Erickson Date: Thu, 24 Jan 2019 15:23:07 -0500 Subject: [PATCH] Add solution to match whitespace problem (#27470) * Add solution to match whitespace problem * fix: corrected case of countWhiteSpace on line 61 --- .../regular-expressions/match-whitespace.english.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.english.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.english.md index ea3d18dfd8..a6bc5cfd08 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.english.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/regular-expressions/match-whitespace.english.md @@ -57,6 +57,8 @@ let result = sample.match(countWhiteSpace);
```js -// solution required +let sample = "Whitespace is important in separating words"; +let countWhiteSpace = /\s/g; +let result = sample.match(countWhiteSpace); ```