JS Coding Questions Logo
JS Coding Questions
#73💼 Interview💻 Code

What is undefined property

Advertisement

728x90

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.

javascript
1var user; // Value is undefined, type is undefined
2
3console.log(typeof user); //undefined

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

javascript
1user = undefined;

Advertisement

Responsive Ad
🎯 Practice NowRelated Challenge

JavaScript Coding Exercise 74

Test your knowledge with this interactive coding challenge.

Start Coding

Advertisement

728x90
73of476