Home
My Highlights
Discover
Sign up
Native prototypes
javascript.info
Other built-in objects such as Array, Date, Function and others also keep methods in prototypes. By specification, all of the built-in prototypes have Object.prototype on the top. …But the short notation obj = {} is the same as obj = new Object(), where Object is a built-in object constructor functi
5 Users
0 Comments
24 Highlights
0 Notes
Top Highlights
Other built-in objects such as Array, Date, Function and others also keep methods in prototypes.
By specification, all of the built-in prototypes have Object.prototype on the top.
…But the short notation obj = {} is the same as obj = new Object(), where Object is a built-in object constructor function
When new Object() is called (or a literal object {...} is created), the [[Prototype]] of it is set to Object.prototype
Please note that there is no more [[Prototype]] in the chain above Object.prototype:
Domain
javascript.info
Ready to highlight and find good content?
Glasp is a social web highlighter that people can highlight and organize quotes and thoughts from the web, and access other like-minded people’s learning.
Start Highlighting