[Javascript] Conversion from if statement to OR expression | Deconstruction
The following themes are newly learned features of Javascript.
Short-Circuit Evaluation and OR Expression While using the logical operators, for instance and, or, and not, there are cases where the assessment of the second value is irrelevant. For example in OR expressions, when the first value is true, the expression is true no matter the second value of the expression. In these cases, Javascript chooses not to evaluate the second value, and this is called “short-circuit evaluation”.