I am learning about inherited properties and I am pretty confused. I would really appreciate your help to give me some clarity.
So, an inherited property is a property that the object inherits from the prototype object.
An article I read gave an example of an inherited property: "every JavaScript object inherits the toString property from its prototype object"
So, my question is: Are these all inherited properties?
Static methods
Object.assign()
Object.create()
Object.defineProperty()
Object.defineProperties()
Object.entries()
Object.freeze()
Object.fromEntries()
Object.getOwnPropertyDescriptor()
Object.getOwnPropertyDescriptors()
Object.getOwnPropertyNames()
Object.getOwnPropertySymbols()
Object.getPrototypeOf()
Object.is()
Object.isExtensible()
Object.isFrozen()
Object.isSealed()
Object.keys()
Object.preventExtensions()
Object.seal()
Object.setPrototypeOf()
Object.values()
Instance properties
Object.prototype.constructor
Object.prototype.proto
Instance methods
Object.prototype.defineGetter()
Object.prototype.defineSetter()
Object.prototype.lookupGetter()
Object.prototype.lookupSetter()
Object.prototype.hasOwnProperty()
Object.prototype.isPrototypeOf()
Object.prototype.propertyIsEnumerable()
Object.prototype.toLocaleString()
Object.prototype.toString()
Object.prototype.valueOf()
(I found this list from MDN objects, they are static methods, instance properties, and instance methods of objects, https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object)
And So, does that mean all objects have the above properties?
And since functions are basically objects, functions also inherited those?
Also, is there a place I can find the list of all the inherited properties objects have?
Thank you so much in advance! sorry for the long post.