1
0
Fork 0
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:
Jeremy Ashkenas 2009-12-27 12:49:11 -08:00
parent 7ae8687a3e
commit ac00a19514
7 changed files with 27 additions and 22 deletions

View file

@ -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();
})();

View file

@ -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();