The undefined property indicates that a variable has not been assigned a value, or not declared at all. The type of undefined value is undefined too.
1 2 | var user; // Value is undefined, type is undefined console.log(typeof(user)) //undefined |
Any variable can be emptied by setting the value to undefined.
1 | user = undefined |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.