Using the Test Method why not working?

Using the Test Method why not working?
0

#1

This is the solution to the challenge.

let myString = “Hello, World!”;
let myRegex = /Hello/;
myRegex.test(myString); // Change this line

Why isn’t it passing? Thnk you very much guys!

Tha challenge is here:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method/


#2

Dear @alexandriaroberts,

it would be great if you could move your question to the “Javascript” category, because there all the Javascript-focussed campers can help you :slight_smile:

Concerning your question: you lack the original result variable:

let result = myRegex.test(myString);

#3

Thank you very much @5k9m !! How silly is that! :slight_smile: I will move it to JavaScript category!