added showStep to our chain in the solution
This commit is contained in:
parent
83d20033e4
commit
690c223335
1 changed files with 3 additions and 3 deletions
|
@ -23,7 +23,7 @@ let ladder = {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
ladder.up().up().down().up().down().showStep(); // 1
|
ladder.up().up().down().showStep().down().showStep(); // shows 1 then 0
|
||||||
```
|
```
|
||||||
|
|
||||||
We also can write a single call per line. For long chains it's more readable:
|
We also can write a single call per line. For long chains it's more readable:
|
||||||
|
@ -33,7 +33,7 @@ ladder
|
||||||
.up()
|
.up()
|
||||||
.up()
|
.up()
|
||||||
.down()
|
.down()
|
||||||
.up()
|
.showStep() // 1
|
||||||
.down()
|
.down()
|
||||||
.showStep(); // 1
|
.showStep(); // 0
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue