Skip to content

Fix an incorrect sentence for a code example. #459

Closed
wants to merge 1 commit into from

2 participants

@jackfranklin

The code states the function references a global variable, but it
doesn't, it just references a variable outside the scope of the
function.

Hat tip to @matbad who emailed me to point out my mistake.

This code example isn't necessarily the best or most clear...so the discussion here might be to just remove this example, or add a clearer one, but I did fix the original error.

@jackfranklin jackfranklin Fix an incorrect sentence for a code example.
The code states the function references a global variable, but it
doesn't, it just references a variable outside the scope of the
function.
640df57
@scottgonzalez
jQuery Foundation member

There's also #452 which expands the section.

@scottgonzalez
jQuery Foundation member

I think the addition of "then executed" will just add confusion for new users. The phrasing "outside of a function's scope" is also confusing as it sounds like you're referring to a variable that the function can't actually see, as opposed to one that it can see but was defined in a higher scope.

I'm going to close this, but feel free to send another pull request with different wording.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.