diff --git a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none/index.md b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none/index.md index 02d0429257..5088b31e6d 100644 --- a/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none/index.md +++ b/client/src/guide/english/certifications/javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none/index.md @@ -1,10 +1,20 @@ ---- -title: Check for All or None ---- + ## Check for All or None -This is a stub. Help our community expand it. - -This quick style guide will help ensure your pull request gets accepted. - + +## The Problem: + +We need to change the regex ```favRegex``` to match both the American English (favorite) and the British English (favourite) version of the word. + + ## Solution: + + ```js +let favWord = "favorite"; +let favRegex = /favou?rite/; // Change this line +let result = favRegex.test(favWord); +``` + + ## Explanation: + +In this regex (```/favou?rite/```), we specify the possible existence of an element (```u```) with a question mark, ```?```.