How to use arrow syntax callback in .some() method

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.

please post a link to the challenge you are working on

You are asked to pass the msg function parameter to regex.test()

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.