beautify 1st part of the tutorial

This commit is contained in:
Ilya Kantor 2015-03-10 12:36:58 +03:00
parent e3dd2cedc0
commit 6444024a9d
327 changed files with 2358 additions and 1986 deletions

View file

@ -4,20 +4,20 @@
//+ run
var ladder = {
step: 0,
up: function() {
this.step++;
up: function() {
this.step++;
return this;
},
down: function() {
this.step--;
down: function() {
this.step--;
return this;
},
showStep: function() {
alert(this.step);
showStep: function() {
alert( this.step );
return this;
}
}
ladder.up().up().down().up().down().showStep(); // 1
ladder.up().up().down().up().down().showStep(); // 1
```