Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8647629
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:06:57+00:00 2026-06-12T13:06:57+00:00

Quote from Stoyan Stefanov’s Object-Oriented JavaScript (page 84): If you’re at point a, you’re

  • 0

Quote from Stoyan Stefanov’s Object-Oriented JavaScript (page 84):

enter image description here

If you’re at point a, you’re inside the global space. If you’re at point b, which is
inside the space of the function F, then you have access to the global space and to
the F-space. If you’re at point c, which is inside the function N, then you can access
the global space, the F-space and the N-space
You cannot reach from a to b, because
b is invisible outside F. But you can get from c to b if you want, or from N to b. The
interesting thing—the closure—happens when somehow N breaks out of F and ends
up in the global space.”

I think the bold sentence above should be changed to “If you’re at point c, which is inside the function N, then you can access the global space and the N-space ” (the F-space shouldn’t be contained, because the point c only has access to N-space and the global scope G. ).

Am I right? thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:06:58+00:00Added an answer on June 12, 2026 at 1:06 pm

    As others have said, no.

    Just about the whole point about a closure is that an external reference to an inner function keeps not only that inner function alive but also allows it to access the outer environment in which it was created, even if that outer environment arose from an executed function that has completed and returned.

    I think the diagram would better illustrate closure if the blue N were shown inside F and the dotted version (the reference to N) were shown outside F.

    The last sentence of the quoted statement could also be improved :

    The interesting thing — a closure – happens when an external reference to N exists, outside F.

    Note that this version avoids mention of the global space. Any external scope will suffice for a closure to be formed.

    The statement could go further to say that the mechanism which allows closures to be formed is the suppression of Garbage Collection.

    Warning: There are many bad definitions and descriptions of “closure”, both on the web and in books. Stack Overflows’s current tag wiki entry for “closures” is a case in point.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

And I quote from MSDN http://msdn.microsoft.com/en-us/library/aa366533(VS.85).aspx : The malloc function has the disadvantage of
Quote from C# language specification 3.9: '2. If the object, or any part of
A quote from the book I'm reading Head First Java : The point is
First, a quote from the ole' manual on ArrayAccess::offsetSet() : This function is not
I quote from Apache Commons Page for Commons FileUpload This page describes the traditional
Check out this quote from here , towards the bottom of the page. (I
I am trying to get my head around Object Oriented Programming in Javascript and
Quote from Wikipedia : A public key token. This is a 64-bit hash of
Quote from Head first html: You can add padding to the top and bottom
Quote from Jason Coco it not possible to set multiple in UILabel... but how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.