FrontendDeveloper.in

JavaScript question detail

What is undefined property

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;
Back to all JavaScript questions
Get LinkedIn Premium at Rs 399