en.javascript.info/1-js/4-object-basics/04-object-methods/8-chain-calls/_js.view/solution.js
Ilya Kantor 3defacc09d up
2016-11-12 19:38:58 +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);
}
};