DEV Community

Discussion on: Danger! Undefined ahead

Collapse
karataev profile image
Eugene Karataev

I think hasOwnProperty method solves your case perfectly.
hasOwnProperty

Collapse
polyov_dev profile image
Evan Derby Author

if this were stack overflow, I would mark this as the accepted answer.