javascript-questions icon indicating copy to clipboard operation
javascript-questions copied to clipboard

Q14. All object have prototypes. (wrong explanation)

Open Ali7040 opened this issue 1 year ago • 3 comments

The base object is the object created by the user, or an object that is created using the new keyword. is incorrect.

The correct explanation is that Object.prototype is the base object in JavaScript. All objects, except for Object.prototype itself, have prototypes. Objects created by the user or with the new keyword inherit from a prototype, typically Object.prototype or a constructor's prototype.

Please correct me if I am wrong.

Ali7040 avatar Sep 05 '24 23:09 Ali7040

exactly you are spot on, I hope the author review this and edits it, otherwise we have to raise the pr.

FrOz3nFir3 avatar Sep 19 '24 12:09 FrOz3nFir3

The term "base object" is not found in the JavaScript language specification, so I think it is inappropriate to use it.

Am I wrong?

iNikAnn avatar Oct 02 '24 04:10 iNikAnn

@iNikAnn You're right, it's not a term found in the JavaScript specification, it is a programming term that people often use to refer to objects that serve as prototypes or foundations from which other objects inherit properties or methods.

Ali7040 avatar Oct 03 '24 00:10 Ali7040