Difference between Undefined Value and Null Value

Undefined variable: A variable that is declared but the value is not defined for that. Undefined value: A value that is not defined and has no keyword is known as an undefined value. Example: var testNum; console.log(testNum); // undefined Note: Undefined is of the type undefined. var testNum; console.log(typeof testNum); // undefined Null value: A value … Read more