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

Use of "Declare" instead of "Define" in explaining the code #37351

Closed
alirezatc opened this issue Dec 23, 2024 · 1 comment
Closed

Use of "Declare" instead of "Define" in explaining the code #37351

alirezatc opened this issue Dec 23, 2024 · 1 comment
Labels
closed: wontfix Out of scope, too much effort, or working as intended

Comments

@alirezatc
Copy link

MDN URL

https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Async_JS/Introducing

What specific section or headline is this issue about?

Synchronous programming

What information was incorrect, unhelpful, or incomplete?

Declares a string called name.
Declares another string called greeting, which uses name.

What did you expect to see?

Defines a string called name.
Defines another string called greeting, which uses name.

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

A variable declaration is when you specify a type and an identifier but have not yet assigned a value to the variable. A variable definition is when you assign a value to a variable, typically with the assignment operator =.

MDN metadata

Page report details
@alirezatc alirezatc added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Dec 23, 2024
@Josh-Cena
Copy link
Member

Hi there, thanks for your suggestion about terminology preciseness. While I agree there's a subtle difference between declaration and definition, "definition" is not a term precisely defined on MDN. "Declaration" and "initialization" are, but only in the context of talking about hoisting and separate declaration and initialization. For constant variables, there's no difference between any of these terms since one always implies the other.ore practically, even if we fix this sporadic case, it is impossible for us to fix all of them and more importantly enforce it as a rule in the future, so in general we give such freedom of terminology to each writer's discretion and do not emphasize on individual word choices. This is similar to our established decision that we will not make a formal differentiation between "parameter" and "argument".

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Dec 23, 2024
@Josh-Cena Josh-Cena added closed: wontfix Out of scope, too much effort, or working as intended and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Dec 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: wontfix Out of scope, too much effort, or working as intended
Projects
None yet
Development

No branches or pull requests

2 participants