Conditionals Flashcards
1
Q
What is the difference between programming operators (&&, ||, !) and English operators (and, or, not)?
A
Programming operator have higher presedence than english operators.
2
Q
What is the main purpose of English operators?
A
Sever as control flow of logic like the if modifier.
3
Q
What is short-circuit evaluation?
A
It is an evaluation strategy in which the second argument is evaluated only if the first argument does not suffice to determine the value of the expression.
4
Q
How does the short-circuit evaluation work?
A
For the AND function if the first argument is evaluated to false all the expression is false. In the OR function, if the first argument is true, all the expression is true.