This code runs and i don’t understand why
const isSpam = (msg) => denyList.some((regex) => regex.test(msg)) || helpRegex.test(msg);
This code runs and i don’t understand why
const isSpam = (msg) => denyList.some((regex) => regex.test(msg)) || helpRegex.test(msg);
Why is the || there?
I just tried it and it worked so i’m confused as well
Hmm, try not using the || and everything after
yeah that’s the correct answer Thank you
This is such a great explanation. It helped me solve and understand this one. I literally created a new account to like and post this. Thank you lasjorg!
Thank you, this is very helpful!
It would be nicer if the instruction could just tell us to amend the existing code
Thank you! This explanation also helped me as well.
This is one of the issues I’m facing with this JavaScript course. I find that certain steps are way to vague or too jargon heavy without a easier explanation.
I don’t need to to be shown baby steps, but I also need a little more more to go off of sometimes or maybe the hint system could provide a stronger explanation. JavaScript is still very new to me and I often feel lost with some of these steps.
The new curriculum is still being worked on. It will slowly improve over time, I’m sure.
I do agree this step could be clarified a bit better. Anyone can open an issue for it if they would like to.
Guys this just an appreciation for solving the problem, and I realised it started from January and finally solved on May well done guys that is the spirit of a developer.
Thanks for this reply, sometimes the text of the steps is not very descriptive.
Yeah, very true. This lesson especially. I think it should be broken up into 2 steps, and the instructions made more clear. Instructions should at least say that you are modifying the existing arrow function.
Also, the example used is very poor and confusing:
arr.some(letter => letter === letter.toUpperCase())
What even is that inside the .some method? It kind of looks like an implicit arrow function but it’s missing the paramater. Even functions that don’t declare a parameter need the brackets (), right? Anyways, your function needs them, so the example should mimic the solution.
If there is only one parameter, you do not need ()
Ok, that’s the first time I have heard that. We haven’t been taught that before (from what I remember), so this is a poor example that just causes confusion.