beautify 1st part of the tutorial
This commit is contained in:
parent
e3dd2cedc0
commit
6444024a9d
327 changed files with 2358 additions and 1986 deletions
|
@ -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
|
||||
```
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue