File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ This example assigns the unnamed and *anonymous* function to the variable `foo`.
2525 foo(); // this raises a TypeError
2626 var foo = function() {};
2727
28- Due to the fact that ` var ` is a declaration, that hoists the variable name ` foo `
28+ Due to the fact that ` var ` is a declaration that hoists the variable name ` foo `
2929before the actual execution of the code starts, ` foo ` is already defined when
3030the script gets executed.
3131
@@ -41,8 +41,8 @@ Another special case is the assignment of named functions.
4141 }
4242 bar(); // ReferenceError
4343
44- Here ` bar ` is not available in the outer scope, since the function only gets
45- assigned to ` foo ` ; however, inside of ` bar ` it is available. This is due to
44+ Here, ` bar ` is not available in the outer scope, since the function only gets
45+ assigned to ` foo ` ; however, inside of ` bar ` , it is available. This is due to
4646how [ name resolution] ( #function.scopes ) in JavaScript works, the name of the
4747function is * always* made available in the local scope of the function itself.
4848
You can’t perform that action at this time.
0 commit comments