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`.
25
25
foo(); // this raises a TypeError
26
26
var foo = function() {};
27
27
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 `
29
29
before the actual execution of the code starts, ` foo ` is already defined when
30
30
the script gets executed.
31
31
@@ -41,8 +41,8 @@ Another special case is the assignment of named functions.
41
41
}
42
42
bar(); // ReferenceError
43
43
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
46
46
how [ name resolution] ( #function.scopes ) in JavaScript works, the name of the
47
47
function is * always* made available in the local scope of the function itself.
48
48
You can’t perform that action at this time.
0 commit comments