-1

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") { .. }
}
too honest for this site
  • 12,050
  • 4
  • 30
  • 52

1 Answers1

1

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.

Carcigenicate
  • 43,494
  • 9
  • 68
  • 117