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

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -