Skip to content

Commit 9c2277e

Browse files
committed
Add commas for introductory statements.
Fix comma splice.
1 parent 424214f commit 9c2277e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

doc/en/function/this.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ When using `this` in global scope, it will simply refer to the *global* object.
1515

1616
foo();
1717

18-
Here `this` will again refer to the *global* object.
18+
Here, `this` will again refer to the *global* object.
1919

2020
> **ES5 Note:** In strict mode, the global case **no longer** exists.
2121
> `this` will instead have the value of `undefined` in that case.
@@ -24,14 +24,14 @@ Here `this` will again refer to the *global* object.
2424

2525
test.foo();
2626

27-
In this example `this` will refer to `test`.
27+
In this example, `this` will refer to `test`.
2828

2929
### Calling a Constructor
3030

3131
new foo();
3232

3333
A function call that is preceded by the `new` keyword acts as
34-
a [constructor](#function.constructors). Inside the function `this` will refer
34+
a [constructor](#function.constructors). Inside the function, `this` will refer
3535
to a *newly created* `Object`.
3636

3737
### Explicit Setting of `this`
@@ -56,7 +56,7 @@ inside of `foo` will be set to `bar`.
5656
### Common Pitfalls
5757

5858
While most of these cases make sense, the first one is to be considered another
59-
mis-design of the language, as it **never** has any practical use.
59+
mis-design of the language because it **never** has any practical use.
6060

6161
Foo.method = function() {
6262
function test() {
@@ -65,10 +65,10 @@ mis-design of the language, as it **never** has any practical use.
6565
test();
6666
}
6767

68-
A common misconception is that `this` inside of `test` refers to `Foo`, while in
69-
fact it **does not**.
68+
A common misconception is that `this` inside of `test` refers to `Foo`; while in
69+
fact, it **does not**.
7070

71-
In order to gain access to `Foo` from within `test` it is necessary to create a
71+
In order to gain access to `Foo` from within `test`, it is necessary to create a
7272
local variable inside of `method` which refers to `Foo`.
7373

7474
Foo.method = function() {
@@ -85,17 +85,17 @@ be used to pass `this` values around.
8585

8686
### Assigning Methods
8787

88-
Another thing that does **not** work in JavaScript is function aliasing, that is,
88+
Another thing that does **not** work in JavaScript is function aliasing, which is
8989
**assigning** a method to a variable.
9090

9191
var test = someObject.methodTest;
9292
test();
9393

94-
Due to the first case `test` now acts like a plain function call; therefore,
94+
Due to the first case, `test` now acts like a plain function call; therefore,
9595
`this` inside it will no longer refer to `someObject`.
9696

97-
While the late binding of `this` might seem like a bad idea at first, it is in
98-
fact what makes [prototypal inheritance](#object.prototype) work.
97+
While the late binding of `this` might seem like a bad idea at first, in
98+
fact, it is what makes [prototypal inheritance](#object.prototype) work.
9999

100100
function Foo() {}
101101
Foo.prototype.method = function() {};

0 commit comments

Comments
 (0)