I'm interested if it's possible to avoid using multiple operators to make an if statement when you want to check a similar condition for multiple variables. for example :
var good = 0;
var bad = 0;
var neutral = 0;
if(good === 0 && bad === 0 && neutral === 0){
DO SMTH . . .
}
instead of this if there's something that does it similar to the following :
if(good,bad and neutral === 0){
do smth . . .
}
So basically, just to avoid multiple operators. thank you!
Well... what about this
def total = good + bad + neutral;
if (total === 0) {
// do something
}
This works only if you are sure values are positive values.