That's the first time I've heard this. Do you have any evidence to back this up?
To my mind the distinction between the two is quite clear:
undefined: no value has yet been assigned
null: explicitly set to empty
In practice I agree they're interchangeable, but occasionally it's useful to be able to distinguish between a value that hasn't been set and one that has been explicitly emptied.
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.
That's the first time I've heard this. Do you have any evidence to back this up?
To my mind the distinction between the two is quite clear:
undefined
: no value has yet been assignednull
: explicitly set to emptyIn practice I agree they're interchangeable, but occasionally it's useful to be able to distinguish between a value that hasn't been set and one that has been explicitly emptied.