Tell us what’s happening:
I deleted the line of code that needed changing and wrote the code and checked my answer to find i was correct but found myself stuck because I could not see the challenge telling me it needed to be assigned to a let variable with a specific name “result”, I realise my method of deleting the line in need of change was maybe not a preferred method but i feel a hint in the challenge to well hint that a var should be assigned to the code is needed for thoose like myself that failed to see my flaw.
Just a friendly suggestion to help.
Your code so far
let myString = "Hello, World!";
let myRegex = /Hello/;
let result = myRegex.test(myString); // Change this line
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36
.
Challenge: Using the Test Method
Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/regular-expressions/using-the-test-method