DEV Community

Discussion on: You don't need null

Collapse
 
atemiz profile image
Ahmet Temiz

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