There would be more of a case for null/undefined as separate values if something like this:
{key:"value",...{key:undefined}}
actually worked, that is, returned {key: "value"}; but instead, JS still treats undefined in the second object as different from not setting a value at all, which makes this whole distinction very pointless.
Some comments have been hidden by the post's author - find out more
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
There would be more of a case for
null/undefinedas separate values if something like this:actually worked, that is, returned
{key: "value"}; but instead, JS still treatsundefinedin the second object as different from not setting a value at all, which makes this whole distinction very pointless.