Tell us what’s happening:
First of all, I don’t really need help in solving this challenge because I’ve already passed it through trial and error. I just want to know how it works.
I can’t really wrap my head around the explanation given in the challenge. It says that using the asterisk “matches characters that occur zero or more times”. I just can’t comprehend how it works. Does that mean you would get a match even if the character you’re searching for is not present, since the asterisk matches characters even if they occurred zero times? Idk if I’m even making sense right now but that’s how I understand it based on the explanation, and I know it can’t be right based on the given examples.
I’m usually quite confident of my English comprehension skills despite being a non-native speaker, but I’m not so sure now lol. The phrase “zero or more times” is really confusing the hell out of me and I can’t proceed to the rest of the challenges because of this. Help please.
Your code so far
let chewieQuote = "Aaaaaaaaaaaaaaaarrrgh!"; let chewieRegex = /change/; // Change this line let result = chewieQuote.match(chewieRegex);
Your browser information:
User Agent is:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.132 Safari/537.36.