en.javascript.info/1-js/04-object-basics/04-object-methods/8-chain-calls/_js.view/solution.js
Ilya Kantor 9ad9063d00 up
2016-11-28 21:35:42 +03:00

15 lines
No EOL
201 B
JavaScript

let ladder = {
step: 0,
up: function() {
this.step++;
return this;
},
down: function() {
this.step--;
return this;
},
showStep: function() {
alert(this.step);
}
};