1

I have an if-else statement wherein it would not run if two variables have the same value. But if those two variables are both "0", it would run.

if (a != b){
     //it should also proceed here if a and b are both "0". What should my statement be?
}
Need Help
  • 51
  • 6

1 Answers1

2
I've solved it guys. Thank you.

if (a != b || (a == "0" && b == "0")){
   //it should also proceed here if a and b are both "0". What should my statement be?
}
Need Help
  • 51
  • 6