Why is prototype undefined?
Object.prototype.toString is a Function type, then why and how can there be no prototype
All functions have prototype, but why is undefined in the example? And undefined is not an object
So I’m curious, and Math.max, for example, has no prototype attribute
By default, all functions have a public and enumerable property named prototype
This sentence can’t be said wrong, can only calculate words haven’t finished. “Default” is indeed the case, but
prototypeIt is just a common attribute that can be set manually.
__proto__Is inherited (although can also be modified).
prototypeThe meaning of existence is that when function is used as a constructor (
SuperThe that can be copied to the build object
__proto__Go. For some internal methods, it is definitely not as a constructor, so there is no.
prototypeIs very reasonable (at the same time also have no.
For a detailed reading, seeSpecification:
Built-in functions that are not constructors do not have aprototypeproperty unless otherwise specified in the description of a particular function.