Problem :
Remember that arrays have a .some()
method. Use the .some()
method to check if testing your msg
on any of your denyList
regular expressions returns true
.
Use regex
as the parameter for the callback function, for clarity.
Solution : denyList.some(regex => regex.test(messageInput.value));
I don’t know why, but even after implementing the solution, the problem persists. It states, “Your .some() method should use arrow syntax for the callback.”
If anyone has an idea of what I might be missing, please let me know.