Clarify my understanding of a bit of JavaScript
From the MDN
The hasOwnProperty() method returns a boolean indicating whether the object has the specified property as its own property (as opposed to inheriting it).
Lots of properties (toString
, for example) are inherited but likely not something you would want to iterate over when checking keys defined on an object.