Created
August 5, 2011 17:21
-
-
Save rwaldron/1128027 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var Person = { | |
'initialize': function(first, last) { | |
this.first = first; | |
this.last = last; | |
}, | |
'speak': function(message) { | |
return this.first + ' ' + this.last + ': ' + message; | |
} | |
}; | |
// Unary `<|`; equivalent to `{} <| Person`. | |
var kit = <| Person; | |
kit.initialize('Kit', 'Goncharov'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment