Merge pull request #1355 from paroche/patch-39

Update article.md
This commit is contained in:
Ilya Kantor 2019-09-18 12:46:15 +03:00 committed by GitHub
commit 9f3178b93e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -136,7 +136,7 @@ Usually, constructors do not have a `return` statement. Their task is to write a
But if there is a `return` statement, then the rule is simple:
- If `return` is called with object, then it is returned instead of `this`.
- If `return` is called with an object, then the object is returned instead of `this`.
- If `return` is called with a primitive, it's ignored.
In other words, `return` with an object returns that object, in all other cases `this` is returned.