I was just confused so I made this prompt Is this ...
# android
m
I was just confused so I made this prompt Is this really correct?
m
Hey, I think this question is more suitable to the #getting-started channel.
c
Or write unit tests 😅
🙌 1
f
I think what you’re trying to do is a bit unclear; execute when: a) count is greater than 5 OR b) count is greater than 5, and also divisible by 50 This would make the ‘divisible by 50’ redundant to check; Or you’re checking ‘greater than 5’ twice which is redundant.
Copy code
if (count > 5) {
  // Do something
}
There you go.
a
No it won't work. It will always execute the block for any count > 50 .
b
@Akram Raza yes, because there is an OR operator 😄