Error when submitting

Tell us what’s happening:
My result is true but it doesnt accept it when i submit it.
Your code so far


let myString = "Hello, World!";
let myRegex = /Hello/;
myRegex.test(myString);

console.log(myRegex.test(myString));

Your browser information:

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

Challenge: Using the Test Method

Link to the challenge:

You removed the result variable and added a console.log. The test wants you to retain the result variable.

let result = myRegex; // Change this line

oh no… i should read the instructions better haha.

thank you, Jeremy.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.