- Null & Undefined– Also represented as typeOf null == “object”, this statement implies that the values of an object is null and the data is not defined. The chances of developers getting confused between null and undefined are greater.
typeof null; // object
typeof undefined; // undefined
- Global Variables– A variable cannot be considered as global unless it is defined locally. A programmer who misses this procedure may have to face with more number of bugs than he can count. The only way to avoid this situation is by making the variables local by default, for which additional steps are to be followed that may increase the overall complexity.