Match Anything with Wildcard Period help

Match Anything with Wildcard Period help
0

#1

Tell us what’s happening:

When I use .test() I keep getting errors. When I try to run with .match everything other than the .test() passes. When I use .test() nothing passes.

Your code so far


let exampleStr = "Let's have fun with regular expressions!";
let unRegex = /.un/; // Change this line
let result = exampleStr.test(unRegex);


Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/regular-expressions/match-anything-with-wildcard-period


#2

What do you mean when you say you use .test()? If the only line you’re changing is the one that says “Change this line”, then the code you included above should pass. What errors are you getting?


#3

When I use .test() none of the tests pass and the error is
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
exampleStr.test is not a function
// tests completed


#4

Are you by any chance using Edge, IE, or Safari as your browser? Free Code Camp has been updated to use newer technologies. It makes the application much faster and it means that we can go much longer without having to do a huge migration like the recent one. However, Edge, Internet Explorer, and Safari are very bad about choosing not to adhere to standards and support new functionality in JS and CSS. Right now, that means that these browsers exhibit lots of unexpected behavior. If you become a web developer you will come to hate these browsers with every fiber of your being.