
JavaScript's && and || operators short-circuit — they stop evaluating as soon as the result is determined. a && b returns b only if a is truthy. a || b returns a if truthy, otherwise b. This is used everywhere in modern JS: user && user.name safely accesses a property only if the object exists.
Reference:
TaskLoco™ — The Sticky Note GOAT