Question about this exercise: https://www.codecademy.com/courses/objects-ii/5/3?curriculum_id=506324b3a7dffd00020bf661#
I've resolved the exercise and my code is running correctly, but I am having some trouble with the theory/concept behind this exercise.
- What is object referred to in Object.prototype? We never created a new object here so where did this object come from?
- What is accomplished by adding .prototype to Object?
- Why do we pass "hasOwnProperty" as an argument in Object.prototype.hasOwnProperty?
Would love some help here. Thanks!
// what is this "Object.prototype" anyway...? var prototypeType = typeof Object.prototype; console.log(prototypeType); // now let's examine it! var hasOwn = Object.prototype.hasOwnProperty("hasOwnProperty"); console.log(hasOwn);