`null` represents deliberate emptiness: someone checked and chose to say there is no value. `undefined` commonly means a value is unset, a property is missing, or a function has no return value. These are conventions, not formal rules. section 4.1
Common conventions distinguish the two forms of absence:
- Use `undefined` for uninitialized variables, missing arguments or properties, and work not yet done. section 4.1
- Use `null` for intentionally empty values, a checked query with no result, or clearing a previously set value. section 4.1
function processValue(val) {
if (val === undefined) { #A
return 'not set'; #A
} #A
if (val == null) { #B
return 'no value'; #B
} #B
return `processing ${val}`; #C
}A strict check can single out `undefined`; `val == null` is a deliberate loose-equality check that matches both `null` and `undefined`. section 4.1
Assigning `null` removes one reference path to an object; it does not guarantee reclamation if another path still reaches the object. section 9.1.1






































