Minor grammatical fixes
This commit is contained in:
parent
5c7ba26b36
commit
d0c3c695fb
1 changed files with 1 additions and 1 deletions
|
@ -226,7 +226,7 @@ Usually such call is a programming error. If there's `this` inside a function, i
|
|||
```smart header="The consequences of unbound `this`"
|
||||
If you come from another programming language, then you are probably used to the idea of a "bound `this`", where methods defined in an object always have `this` referencing that object.
|
||||
|
||||
In JavaScript `this` is "free", its value is evaluated at call-time and does not depend on where the method was declared, but rather on what's the object "before the dot".
|
||||
In JavaScript `this` is "free", its value is evaluated at call-time and does not depend on where the method was declared, but rather on what object is "before the dot".
|
||||
|
||||
The concept of run-time evaluated `this` has both pluses and minuses. On the one hand, a function can be reused for different objects. On the other hand, greater flexibility opens a place for mistakes.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue