Help with a JavaScript please

Hello,

Can someone tell me what I am doing wrong here…
It worked well before I added the function
function hasIllegalCharacters(the_email, illegal_string) and checked for it like
&&
(hasIllegalCharacters == true)) // and there are none of these !#$%^&*()/:;,+

I am getting “Sorry, your email address is invalid!” with both valid and invalid emails.

Validating an Email Address

Email Address:

Thanks.

Lennox