Javascript If doesn't equal OR doesn't equal -


i'm having issue making work:

status_ = 'not contacted'  if (!(status_ == "contacted") || (status_ == "not contacted") || (status_ == "not sure")) {     console.log('didnt match: '+status_)} else{console.log('matched: '+status_)} 

it returns - didnt match: not contacted

but if change status_ = 'contacted' matched: contacted

what doing wrong?

the not works first condition, change parentheses

if (!(status_ == "contacted" || status_ == "not contacted" || status_ == "not sure")) {... 

Comments

Popular posts from this blog

how to insert data php javascript mysql with multiple array session 2 -

multithreading - Exception in Application constructor -

windows - CertCreateCertificateContext returns CRYPT_E_ASN1_BADTAG / 8009310b -