Skip to content

remove a wrong word #443

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

Closed
wants to merge 1 commit into from
Closed

remove a wrong word #443

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Dec 2, 2013

The foo variable is a local variable in the code. if the variable is a global variable, that function myFn can see changes to the variable value too, so i removed the word 'global'.

The `foo` variable is a local variable in the code. if the variable is a global variable, that function `myFn` can see changes to the variable value too, so i removed the word 'global'.
@mgol
Copy link
Member

mgol commented Dec 2, 2013

Thanks for taking the time to contribute to the jQuery project! Can you sign the CLA?

As for the change, the key thing here is that the variable is declared outside of the function definition. I agree current wording is unfortunate but your change also doesn't explain what's really happening. Can you adjust the wording?

@ghost
Copy link
Author

ghost commented Dec 5, 2013

@mzgol Thanks for your reply! When i visited the CLA page, there was some error happend, like this, "Refused to display 'https://accounts.google.com/ServiceLogin?service=wise&passive=1209600&conti…s.google.com%2Fembeddedform%3Fformkey%3DdFJucXdGZXlRdVh2SUVUb2hsb0FBYkE6MQ' in a frame because it set 'X-Frame-Options' to 'DENY'. " Maybe it's my network problems, I'll try it later.

For the change, adjust the wording to explain what's really happening, Did you mean it's because closures?

@scottgonzalez
Copy link
Member

@ethrea1 There are some weird issues with Google Docs. Can you try using a different browser? Sometimes that helps. We haven't been able to figure out what the problem is, but I do have a plan to eventually work around the issue altogether.

@mgol
Copy link
Member

mgol commented Dec 5, 2013

@ethrea1 I'm saying that if the variable was declared inside the function then it's destroyed after the function returns. An important thing here is that the variable is declared outside of the function; the global variable form indicated that, while making more assumptions than it should but - on the other hand - your correction removes any assumptions which is incorrect in the other direction.

@scottgonzalez
Copy link
Member

More accurate wording would be something like "when you reference a variable from a parent scope" though I don't know if "parent scope" is technically correct. @rwaldron can likely provide the correct wording.

@mgol
Copy link
Member

mgol commented Dec 5, 2013

parent scope would be incorrect as it can be buried further up. outer scope would be more correct but let's see what @rwaldron says.

@ghost
Copy link
Author

ghost commented Dec 7, 2013

@scottgonzalez Maybe it's my network problems, i have signed CLA. Thank you!

@scottgonzalez
Copy link
Member

This was handled in b137fd2.

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

Successfully merging this pull request may close these issues.

3 participants