Added a solution-fixed stub :) (#34199)
Added a solution to the stub regarding Javascript Algorithms And Data Structures Certification\Regular Expressions + added a bit of a hint in the beginning to spice things up ;)
This commit is contained in:
		
				
					committed by
					
						 Paul Gamble
						Paul Gamble
					
				
			
			
				
	
			
			
			
						parent
						
							99bd2c1dbb
						
					
				
				
					commit
					2910a9e6ac
				
			| @@ -3,8 +3,13 @@ title: Check for All or None | |||||||
| --- | --- | ||||||
| ## Check for All or None | ## Check for All or None | ||||||
|  |  | ||||||
| This is a stub. <a href='https://github.com/freecodecamp/guides/tree/master/src/pages/certifications/javascript-algorithms-and-data-structures/regular-expressions/check-for-all-or-none/index.md' target='_blank' rel='nofollow'>Help our community expand it</a>. |  | ||||||
|  |  | ||||||
| <a href='https://github.com/freecodecamp/guides/blob/master/README.md' target='_blank' rel='nofollow'>This quick style guide will help ensure your pull request gets accepted</a>. | ### Hint: | ||||||
|  | The difference between american and british English for the given word is: favorite-favourite. We need to define the existance of the letter u . | ||||||
|  |  | ||||||
| <!-- The article goes here, in GitHub-flavored Markdown. Feel free to add YouTube videos, images, and CodePen/JSBin embeds  --> | ## Solution | ||||||
|  | ```javascript | ||||||
|  | let favWord = "favorite"; | ||||||
|  | let favRegex = /favou?rite/; // Change this line | ||||||
|  | let result = favRegex.test(favWord); | ||||||
|  | ``` | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user