This commit is contained in:
Ilya Kantor 2019-06-26 12:12:59 +03:00
parent 1191dbb395
commit cb6aac9c0a
3 changed files with 18 additions and 32 deletions

View file

@ -353,7 +353,7 @@ That's a special feature of arrow functions, it's useful when we actually do not
The value of `this` is defined at run-time.
- When a function is declared, it may use `this`, but that `this` has no value until the function is called.
- That function can be copied between objects.
- A function can be copied between objects.
- When a function is called in the "method" syntax: `object.method()`, the value of `this` during the call is `object`.
Please note that arrow functions are special: they have no `this`. When `this` is accessed inside an arrow function, it is taken from outside.