当前位置:网站首页>Combine with (& &) logic or (||), dynamic binding and ternary operation

Combine with (& &) logic or (||), dynamic binding and ternary operation

2022-06-24 07:28:00 I don't drink milk tea or I'm fat

And (&&)

Act on two or more values , And only When all operands are true , Only then true.

1. The first operand is true : Will enter the judgment of the second operand , And whether the second operand is true or false , Will return the second operand .

2. The first operand is false : The judgment of the second operand will not be entered , Returns the first operand directly .

or (||)

The same applies to two or more values , however As long as one operand is true , Just go back to real .

1. If the first operand is true , Then it will not enter the judgment of the second number . So whether the second operand is true or false , All return the first operand directly

2. If the first operand is false , Then it will enter the judgment of the second number . But whether the second operand is true or false , Both return the second operand directly

Dynamic binding combined with ternary operation

原网站

版权声明
本文为[I don't drink milk tea or I'm fat]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/175/202206240202206489.html