Course contentsShow
JavaScript
Lesson 640 of 2,72315. ObjectsPro lesson

Filtering Out Inherited Properties with hasOwnProperty

Check obj.hasOwnProperty(key) inside for...in to skip prototype chain properties.

This lesson is for subscribers

You've completed the free preview. Subscribe to unlock every lesson in every course.