-
-
Save solenoid/1215114 to your computer and use it in GitHub Desktop.
modified Mammal CoffeeScript example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Mammal | |
constructor: (@species, @defining_char) -> | |
print: -> | |
"Hello I'm a #{@species}. I have #{@defining_char}." | |
cat = new Mammal('cat', 'claws') | |
alert(cat.print()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment