Skip to content

Instantly share code, notes, and snippets.

@clooth
Created September 7, 2012 14:42
Show Gist options
  • Select an option

  • Save clooth/3666759 to your computer and use it in GitHub Desktop.

Select an option

Save clooth/3666759 to your computer and use it in GitHub Desktop.
Printer = (info) ->
@name = info.name
Printer.prototype.print = () -> console.log(@name)
# Result
Printer = function(info) {
return this.name = info.name;
};
Printer.prototype.print = function() {
return console.log(this.name);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment