mirror of
https://github.com/jashkenas/coffeescript.git
synced 2022-11-09 12:23:24 -05:00
CoffeeScript 0.1.6 -- bugfixes
This commit is contained in:
parent
7ae8687a3e
commit
ac00a19514
7 changed files with 27 additions and 22 deletions
|
@ -4,8 +4,7 @@
|
|||
change_numbers = function() {
|
||||
var new_num;
|
||||
num = 2;
|
||||
new_num = 3;
|
||||
return new_num;
|
||||
return (new_num = 3);
|
||||
};
|
||||
new_num = change_numbers();
|
||||
})();
|
|
@ -6,8 +6,7 @@
|
|||
return alert(this.name + " moved " + meters + "m.");
|
||||
};
|
||||
Snake = function(name) {
|
||||
this.name = name;
|
||||
return this.name;
|
||||
return (this.name = name);
|
||||
};
|
||||
Snake.__superClass__ = Animal.prototype;
|
||||
Snake.prototype = new Animal();
|
||||
|
@ -17,8 +16,7 @@
|
|||
return Snake.__superClass__.move.call(this, 5);
|
||||
};
|
||||
Horse = function(name) {
|
||||
this.name = name;
|
||||
return this.name;
|
||||
return (this.name = name);
|
||||
};
|
||||
Horse.__superClass__ = Animal.prototype;
|
||||
Horse.prototype = new Animal();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue