Last active
August 29, 2015 13:57
-
-
Save moutend/9519672 to your computer and use it in GitHub Desktop.
CoffeeScript class
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 I | |
doErrands: -> | |
'I did ...' | |
me = I | |
I = new I | |
console.log me.doErrands?() #undefined | |
console.log I.doErrands?() #I did ... | |
# // Generated by CoffeeScript 1.7.1 | |
# (function() { | |
# var I, me; | |
# | |
# I = (function() { | |
# function I() {} | |
# I.prototype.doErrands = function() { | |
# return 'I did ...'; | |
# }; | |
# return I; | |
# })(); | |
# | |
# me = I; | |
# I = new I; | |
# | |
# console.log(typeof me.doErrands === "function" ? me.doErrands() : void 0); | |
# console.log(typeof I.doErrands === "function" ? I.doErrands() : void 0); | |
# | |
# }).call(this); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment