jeudi 6 juillet 2017

Shorten if statement with same condition

Is there a way to shorten an if statement like this:

if(x == 1 && y == 1 && z == 1) -> if((x && y && z) == 1) or if((x,y,z) == 1)

Both of them don't seem to work

Aucun commentaire:

Enregistrer un commentaire