Regular Expressions: Check For Mixed Grouping of Characters

Tell us what’s happening:
I am unable to pass the final test of " Your result should return true ." even though my console shows true when testing. The error I receive is:

ReferenceError: result is not defined
    at eval (eval at _callee$ (test-evaluator.js:569), <anonymous>:11:16)
    at _callee$ (test-evaluator.js:569)
    at x (test-evaluator.js:68)
    at Generator._invoke (test-evaluator.js:68)
    at Generator.E.forEach.t.<computed> [as next] (test-evaluator.js:68)
    at n (test-evaluator.js:58)
    at s (test-evaluator.js:58)
    at test-evaluator.js:58
    at new Promise (<anonymous>)
    at test-evaluator.js:58
_callee$ @ test-evaluator.js:569
x @ test-evaluator.js:68
(anonymous) @ test-evaluator.js:68
E.forEach.t.<computed> @ test-evaluator.js:68
n @ test-evaluator.js:58
s @ test-evaluator.js:58
(anonymous) @ test-evaluator.js:58
(anonymous) @ test-evaluator.js:58
(anonymous) @ test-evaluator.js:569

Your code so far


let myString = "Eleanor Roosevelt";
let myRegex = /(Franklin|Eleanor).*Roosevelt/; 
// console.log(myRegex.test(myString));
myRegex.test(myString);
// After passing the challenge experiment with myString and see how the grouping works

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.70 Safari/537.36.

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 deleted the variable result. You need to assign the value returned from calling the test method on the regular expression back to the result variable.

The original 3 line was:

let result = false; // Change this line

I think changing the text of the last test to the following might make it more clear what needs to be done.

The result variable should have a value of true.

Actually, I am not even sure the last test is needed.

Thank you for your response. I think changing the text of that test (or removing it completely) would be helpful. I forgot that I had even deleted that line.

I was able to pass the test based on your feedback.

Thanks,

Kelsie