Match Literal Strings

Tell us what’s happening:

Would you tell me why the term, /Waldo/, isn’t in quotes please.

Your code so far

let waldoIsHiding = "Somewhere Waldo is hiding in this text.";
let waldoRegex = /Waldo/; // Change this line
let result = waldoRegex.test(waldoIsHiding);

Your browser information:

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

Link to the challenge:

/Waldo/ is the pattern that is being searched in the string waldoIsHiding and if it is found, then it returns True else it returns False. You don’t need the pattern in quotes when you’re doing regex.

Even shorter: that is a Regular Expression, not a String