Using the Test Method

Using the Test Method
0.0 0

#1

The challenge did not mention to set a variable as “result” but when I submitted it said variable not defined. Was this an error in the instructions or am I missing something?


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

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36.

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


#2

Passes for me. Try rebooting, different browser, clear cache, etc.