File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Top Open diff view settings
1-js/04-object-basics/04-object-methods/8-chain-calls Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Top Open diff view settings Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ importance: 2
44
55# Chaining
66
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:
88
99``` js
1010let ladder = {
@@ -21,7 +21,7 @@ let ladder = {
2121};
2222```
2323
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:
2525
2626``` js
2727ladder .up ();
@@ -32,10 +32,10 @@ ladder.down();
3232ladder .showStep (); // 0
3333```
3434
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:
3636
3737``` js
3838ladder .up ().up ().down ().showStep ().down ().showStep (); // shows 1 then 0
3939```
4040
41- Such approach is widely used across JavaScript libraries.
41+ Such an approach is widely used across JavaScript libraries.
You can’t perform that action at this time.
0 commit comments