Skip to content

Commit f24c265

Browse files
raskadnekevss
andauthored
Update blog/2024-10-01-local-variables.md
Co-authored-by: Kevin Ness <[email protected]>
1 parent ac6faad commit f24c265

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

blog/2024-10-01-local-variables.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ We set the `function` flag on each scope when it is created.
320320
The `local` flag on the variables is `true` by default.
321321
After creating all the scopes and filling them with their variables, we traverse the ECMAScript code.
322322
Every time we find a variable access, we check which variable in which scope is being accessed.
323-
If a variable is not in the current scope we go to the `outer` scope.
323+
If a variable is not in the current scope, we go to the `outer` scope.
324324
If any of the scopes we see until we find the variable is a function scope, we set the `local` flag to `false`.
325325

326326
Let's visualize the scope analysis by writing out the scopes for this example:

0 commit comments

Comments
 (0)