Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Q14. All object have prototypes. (wrong explanation) #797

Open
Ali7040 opened this issue Sep 5, 2024 · 3 comments
Open

Q14. All object have prototypes. (wrong explanation) #797

Ali7040 opened this issue Sep 5, 2024 · 3 comments

Comments

@Ali7040
Copy link

Ali7040 commented Sep 5, 2024

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.

@FrOz3nFir3
Copy link

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

@iNikAnn
Copy link

iNikAnn commented Oct 2, 2024

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

Am I wrong?

@Ali7040
Copy link
Author

Ali7040 commented Oct 3, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants