My code is not working.
I am trying to test if my variable is not equal to any of my conditions.
function text(){
if( input!="BSIT" || input!= "BSBA"|| input!="BSN") { .. }
}
My code is not working.
I am trying to test if my variable is not equal to any of my conditions.
function text(){
if( input!="BSIT" || input!= "BSBA"|| input!="BSN") { .. }
}
Those ||
should be &&
s.
You want to test if all the conditions are true, not if any of them are true. ||
will return true as soon as at least one is true.