-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Include information/section on "Method definitions in object literals" #29489
Comments
This section is the only section discussing method definition in classes; everything else is about object literals (or at least, common features between the two). What information are you looking for exactly? Method definitions in object literals are too straightforward: |
The article is well written so I understand the two differences between |
I see. All object properties are equivalent in terms of their attributes, but we can explicitly spell that out. |
MDN URL
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Method_definitions
What specific section or headline is this issue about?
Method definitions in classes
What information was incorrect, unhelpful, or incomplete?
From my perspective, this is incomplete:
What did you expect to see?
I'm browsing the documentation because I'm trying to learn the difference between these two:
But as far as I can tell, the article only explains this for classes. If it mentions how this works on object literals, none of the following section names imply that. This also seems like the most appropriate article for this information; if it's documented elsewhere, I'm not sure where else to look.
I found some information in another page: Object initializer. It doesn't answer my question, but maybe it could be linked to and/or updated to include the answer instead? I don't prefer the latter: I wouldn't expect the information to be there when there's another article title "Method definitions."
Do you have any supporting links, references, or citations?
n/a
Do you have anything more you want to share?
It might make sense to create a whole new section for this information? This section is called "Method definitions in classes", but I'm looking for information regarding "Method definitions in object literals."
MDN metadata
Page report details
en-us/web/javascript/reference/functions/method_definitions
The text was updated successfully, but these errors were encountered: