See short-circuit evaluation for the explanation. It’s a common way of implementing these operators; it is not unique to JavaScript.
See short-circuit evaluation for the explanation. It’s a common way of implementing these operators; it is not unique to JavaScript.