我有一条if-else语句,如果两个变量具有相同的值,它将不会运行。但是,如果这两个变量都为“ 0”,它将运行。
if (a != b){
//it should also proceed here if a and b are both "0". What should my statement be?
}
答案 0 :(得分: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?
}