vendredi 22 janvier 2021

Does Golang execute all the conditions in "if' if the first fails? [duplicate]

Imagine the following piece of code:

if someBool && funcReturningABool() {
    // code here...
}

where someBool is a boolean and funcReturningABool returns true or false.

If someBool is equal to false, will the funcReturningABool still be executed ?

Aucun commentaire:

Enregistrer un commentaire