en.javascript.info/1-js/4-object-basics/03-object-methods/8-chain-calls/_js.view/solution.js
Ilya Kantor 5372c18379 merges
2016-11-06 19:42:32 +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);
}
};