What is short-circuit evaluation in relation to JavaScript's && and || operators?
Short-circuit evaluation is a technique to speed up boolean operations by skipping unnecessary calculations. In JavaScript, both the logical AND (&&) and logical OR (||) operators exhibit short-circuit behavior. For &&, if the first operand evaluates to a falsy value, the operator returns that value immediately without evaluating the second operand, since the result will be falsy regardless. For ||, if the first operand evaluates to a truthy value, the operator returns that value immediately without evaluating the second operand, since the result will be truthy regardless. This behavior is not only an optimization but is also often exploited in patterns like obj && obj.property or defaultValue || userValue.