Learn Regular Expressions by Building a Spam Filter Step 12

I dont understand why are we using “regex” as call back function with arrow syntax using “.text()” method that rerurns boolean as false for clarity. What am I doing wrong in here?

You used msg which is not declared as a variable. It’s a parameter of your function isSpam.
The challenge was to update isSpam function’s body to be what you did instead.

I didn’t understand what you are asking about

1 Like

I was so confused, Thank you very much Mostafa. Like always you save me from this confussion

1 Like