I try to use undefined wherever possible. However, null can be useful for asynchronous operations. For example, if the user object is undefined, the initialization phase has not been completed yet. Otherwise it's ready to use. If null, there is no user. Login is required.
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.
I try to use undefined wherever possible. However, null can be useful for asynchronous operations. For example, if the user object is undefined, the initialization phase has not been completed yet. Otherwise it's ready to use. If null, there is no user. Login is required.