DEV Community

Discussion on: JavaScript check if property exists in Object

Collapse
 
jonrandy profile image
Jon Randy 🎖️ • Edited

You could also check for the existence of the property name in Object.keys(obj). Again, this only checks the objects own properties

Collapse
 
dailydevtips1 profile image
Chris Bongers

Ah yes, indeed another way of checking for own properties.