Merge branch 'master' of https://github.com/iliakan/javascript-tutorial-en
This commit is contained in:
commit
138fb2e022
3 changed files with 3 additions and 3 deletions
|
@ -274,7 +274,7 @@ So it's recommended to install one, even if you don't want to stick to a "code s
|
|||
Most well-known tools are:
|
||||
|
||||
- [JSLint](http://www.jslint.com/) -- one of the first linters.
|
||||
- [JSHint](http://www.jshint.com/) -- more settings than JSHint.
|
||||
- [JSHint](http://www.jshint.com/) -- more settings than JSLint.
|
||||
- [ESLint](http://eslint.org/) -- probably the newest one.
|
||||
|
||||
All of them can do the job. The author uses [ESLint](http://eslint.org/).
|
||||
|
|
|
@ -278,7 +278,7 @@ Looking closely, we may notice two operations in `obj.method()` statement:
|
|||
1. First, the dot `'.'` retrieves the property `obj.method`.
|
||||
2. Then parentheses `()` execute it.
|
||||
|
||||
So, how the information about `this` gets passed from the first part to the second one?
|
||||
So, how does the information about `this` gets passed from the first part to the second one?
|
||||
|
||||
If we put these operations on separate lines, then `this` will be lost for sure:
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ The constructor can't be called again, because it is not saved anywhere, just cr
|
|||
|
||||
Inside a function, we can check whether it was called with `new` or without it, using a special `new.target` property.
|
||||
|
||||
It is empty for regulsar calls and equals the function if called with `new`:
|
||||
It is empty for regular calls and equals the function if called with `new`:
|
||||
|
||||
```js run
|
||||
function User() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue