Skip to content

Commit

Permalink
Update blog/2024-10-01-local-variables.md
Browse files Browse the repository at this point in the history
Co-authored-by: Kevin Ness <[email protected]>
  • Loading branch information
raskad and nekevss authored Dec 10, 2024
1 parent fa5c518 commit 26f7f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion blog/2024-10-01-local-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ console.log(a); // 1

You can see that variables are tied to their scopes.
All three variables `a` never change their values.
They just exist in their respective scopes and as soon as the scope has ended they are no longer accessible.
The variables just exist in their respective scopes, and as soon as the scope has ended, they are no longer accessible.
Instead, the previous outer scope returns to being the current scope and its variables are accessible.

You can see that in addition to blocks, functions also have scopes.
Expand Down

0 comments on commit 26f7f76

Please sign in to comment.