Nov 3, 2021
Using null or undefined is bad practice. Even the creator regrets inventing the null/undefined reference. For one, using null is just lazy. Two, anything can go wrong and cause it to return null/undefined so now debugging becomes troublesome, especially if you allow multiple values to be set to null/undefined, or allow it to be returned by multiple functions.
Instead you should use "", 0, false, [], {}, and so on depending on what a variable is suppose to be.