Change test method from string.test(regex) to regex.test(string) (#37458)
This commit is contained in:
		| @@ -14,8 +14,8 @@ The wildcard character <code>.</code> will match any one character. The wildcard | ||||
| let humStr = "I'll hum a song"; | ||||
| let hugStr = "Bear hug"; | ||||
| let huRegex = /hu./; | ||||
| humStr.test(huRegex); // Returns true | ||||
| hugStr.test(huRegex); // Returns true | ||||
| huRegex.test(humStr); // Returns true | ||||
| huRegex.test(hugStr); // Returns true | ||||
| ``` | ||||
|  | ||||
| </section> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user