What does JavaScrip…
 
Notifications
Clear all

What does JavaScript return to you if you try to access a object's property that doesn't exist?

1 Posts
2 Users
0 Likes
447 Views
0
Topic starter

What does JavaScript return to you if you try to access a object’s property that doesn’t exist?

1 Answer
0

If I tried to access a property name in an object that does not exist, then I would get undefined. For example, if I tried developer. age then the return value would be undefined because the developer object does not have that property name.

Share: