Merge pull request #1305 from paroche/patch-9

Update article.md
This commit is contained in:
Ilya Kantor 2019-09-02 14:37:32 +03:00 committed by GitHub
commit 4d808231b0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -27,7 +27,7 @@ alert(user.name); // Jack
alert(user.isAdmin); // false alert(user.isAdmin); // false
``` ```
When a function is executed as `new User(...)`, it does the following steps: When a function is executed as `new Func(...)`, it does the following:
1. A new empty object is created and assigned to `this`. 1. A new empty object is created and assigned to `this`.
2. The function body executes. Usually it modifies `this`, adds new properties to it. 2. The function body executes. Usually it modifies `this`, adds new properties to it.