Skip to content

Commit 690c223

Browse files
authored
added showStep to our chain in the solution
1 parent 83d2003 commit 690c223

File tree

1 file changed

+3
-3
lines changed
  • 1-js/04-object-basics/04-object-methods/8-chain-calls

1 file changed

+3
-3
lines changed

1-js/04-object-basics/04-object-methods/8-chain-calls/solution.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ let ladder = {
2323
}
2424
};
2525

26-
ladder.up().up().down().up().down().showStep(); // 1
26+
ladder.up().up().down().showStep().down().showStep(); // shows 1 then 0
2727
```
2828

2929
We also can write a single call per line. For long chains it's more readable:
@@ -33,7 +33,7 @@ ladder
3333
.up()
3434
.up()
3535
.down()
36-
.up()
36+
.showStep() // 1
3737
.down()
38-
.showStep(); // 1
38+
.showStep(); // 0
3939
```

0 commit comments

Comments
 (0)