Skip to content

[Closure] Environments in detail (second step) #494

@alimo

Description

@alimo

Second step of Environments in detail part starts with this statement:

The code runs on, and the call to makeCounter() is performed.

But before the function gets called, the counter variable is declared and put inside the global Lexical Environment with an undefined value. (If I've learned correctly 😄)

I don't know if its a mistake or you didn't mention this on purpose for the sake of simplicity. But I think the counter variable should be present in the global Lexical Environment of the provided snapshots.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions