Why he tell You should use `.test()` to test the regex. iam already use it

Why he tell You should use `.test()` to test the regex. iam already use it
0

**Tell us what’s happen
why he tell You should use .test() to test the regex.
iam already use it
Your code so far


let mySRoosevelttring = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*Roosevelt/; 
let result=myRegex.test(mySRoosevelttring)

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 5.1; rv:52.0) Gecko/20100101 Firefox/52.0.

Challenge: Check For Mixed Grouping of Characters

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/check-for-mixed-grouping-of-characters

You’re supposed to pass it a string, not another regex.

Also rename the string variable to myString. Otherwise the tests won’t pass.

2 Likes

thank you for you advise