in JavaScript by
What is undefined property in Javascript?

1 Answer

0 votes
by

The undefined property indicates that a variable has not been assigned a value, or declared but not initialized at all. The type of undefined value is undefined too.

var user; // Value is undefined, type is undefined
console.log(typeof user); //undefined

Any variable can be emptied by setting the value to undefined.

user = undefined;
...