File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ implicitly returns the value of `this` - the new object.
24
24
The above calls ` Foo ` as constructor and sets the ` prototype ` of the newly
25
25
created object to ` Foo.prototype ` .
26
26
27
- In case of an explicit ` return ` statement the function returns the value
27
+ In case of an explicit ` return ` statement, the function returns the value
28
28
specified that statement, ** but only** if the return value is an ` Object ` .
29
29
30
30
function Bar() {
@@ -73,7 +73,7 @@ explicitly return a value.
73
73
Bar();
74
74
75
75
Both calls to ` Bar ` return the exact same thing, a newly create object which
76
- has a property called ` method ` on it, that is a
76
+ has a property called ` method ` on it, which is a
77
77
[ Closure] ( #function.closures ) .
78
78
79
79
It is also to note that the call ` new Bar() ` does ** not** affect the prototype
@@ -86,7 +86,7 @@ not using the `new` keyword.
86
86
87
87
### Creating New Objects via Factories
88
88
89
- An often made recommendation is to ** not** use ` new ` since forgetting its use
89
+ An often made recommendation is to ** not** use ` new ` because forgetting its use
90
90
may lead to bugs.
91
91
92
92
In order to create new object, one should rather use a factory and construct a
You can’t perform that action at this time.
0 commit comments