Skip to content

Commit bf914f1

Browse files
authored
translated
1 parent 4d37377 commit bf914f1

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ importance: 2
22

33
---
44

5-
# Chaining
5+
# Łączenie
66

7-
There's a `ladder` object that allows to go up and down:
7+
Mamy tutaj obiekt `ladder` który pozwala wspinać się do góry i schodzić w dół:
88

99
```js
1010
let ladder = {
@@ -15,13 +15,13 @@ let ladder = {
1515
down() {
1616
this.step--;
1717
},
18-
showStep: function() { // shows the current step
18+
showStep: function() { // pokazuje aktualną wartość step
1919
alert( this.step );
2020
}
2121
};
2222
```
2323

24-
Now, if we need to make several calls in sequence, can do it like this:
24+
Jeśli chcielibyśmy wykonać sekwencję ruchów, możemy zrobić to w ten sposób:
2525

2626
```js
2727
ladder.up();
@@ -30,10 +30,10 @@ ladder.down();
3030
ladder.showStep(); // 1
3131
```
3232

33-
Modify the code of `up`, `down` and `showStep` to make the calls chainable, like this:
33+
Zmodyfkuj kod dla `up`, `down` i `showStep` żeby można było połączyć wywołania kroków, w taki sposób:
3434

3535
```js
3636
ladder.up().up().down().showStep(); // 1
3737
```
3838

39-
Such approach is widely used across JavaScript libraries.
39+
Wiele bibliotek JavaScript wykorzystuje taki sposób pisania kodu.

0 commit comments

Comments
 (0)