if statement - Not Operator in Javascript gives Unexpected Token Error -
using not operator (!
) in conditional gives me:
"uncaught syntaxerror: unexpected token !"
if (text.includes(input[j])) { $(messages[i]).hide(); } else if !(text.includes(input[j])) { $(messages[i]).show(); }
why isn't !
working here?
!
should within ()
:
else if (!text.includes(input[j]))
Comments
Post a Comment