15 lines
No EOL
201 B
JavaScript
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);
|
|
}
|
|
}; |