1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ importance: 2
4
4
5
5
# Chaining
6
6
7
- There's a ` ladder ` object that allows to go up and down:
7
+ There's a ` ladder ` object that allows you to go up and down:
8
8
9
9
``` js
10
10
let ladder = {
@@ -21,7 +21,7 @@ let ladder = {
21
21
};
22
22
```
23
23
24
- Now, if we need to make several calls in sequence, can do it like this:
24
+ Now, if we need to make several calls in sequence, we can do it like this:
25
25
26
26
``` js
27
27
ladder .up ();
@@ -32,10 +32,10 @@ ladder.down();
32
32
ladder .showStep (); // 0
33
33
```
34
34
35
- Modify the code of ` up ` , ` down ` and ` showStep ` to make the calls chainable, like this:
35
+ Modify the code of ` up ` , ` down ` , and ` showStep ` to make the calls chainable, like this:
36
36
37
37
``` js
38
38
ladder .up ().up ().down ().showStep ().down ().showStep (); // shows 1 then 0
39
39
```
40
40
41
- Such approach is widely used across JavaScript libraries.
41
+ Such an approach is widely used across JavaScript libraries.
0 commit comments