@@ -14,7 +14,7 @@ is in the language is *function scope*.
1414> ** Note:** When not used in an assignment, return statement or as a function
1515> argument, the ` {...} ` notation will get interpreted as a block statement and
1616> ** not** as an object literal. This, in conjunction with
17- > [ automatic insertion of semicolons] ( #semicolon ) , can lead to subtle errors.
17+ > [ automatic insertion of semicolons] ( #core. semicolon ) , can lead to subtle errors.
1818
1919There are also no distinct namespaces in JavaScript. This means that everything
2020gets defined in ** one** globally shared namespace.
@@ -72,8 +72,9 @@ unless the desired effect **is** to affect the outer scope.
7272
7373### Local variables
7474
75- The only source for local variables in JavaScript are [ function] ( #functions )
76- parameters and variables that were declared via the ` var ` statement.
75+ The only source for local variables in JavaScript are
76+ [ function] ( #function.general ) parameters and variables that were declared via the
77+ ` var ` statement.
7778
7879 // global scope
7980 var foo = 1;
@@ -95,9 +96,9 @@ the assignment of `bar` will override the global variable with the same name.
9596### Name resolution order
9697
9798All scopes in JavaScript - including the global one - have the name
98- [ this] ( #this ) defined in them, which refers to the "current object".
99+ [ this] ( #function. this ) defined in them, which refers to the "current object".
99100
100- Function scopes also have the name [ arguments] ( #arguments ) defined, which
101+ Function scopes also have the name [ arguments] ( #function. arguments ) defined, which
101102contains the arguments that were passed to a function.
102103
103104For example, when trying to access a variable named ` foo ` inside the scope of a
@@ -127,8 +128,8 @@ easily avoided with the help of anonymous *function wrappers*.
127128 })(); // execute the function immediately
128129
129130
130- Unnamed functions are considered [ expressions] ( #functions ) ; so in order to being
131- callable, they must first be evaluated.
131+ Unnamed functions are considered [ expressions] ( #function.general ) ; so in order to
132+ being callable, they must first be evaluated.
132133
133134 ( // evaluate the function inside the paranthesis
134135 function() {}
0 commit comments