Skip to content

Instantly share code, notes, and snippets.

@rwaldron
Created August 5, 2011 17:21
Show Gist options
  • Save rwaldron/1128027 to your computer and use it in GitHub Desktop.
Save rwaldron/1128027 to your computer and use it in GitHub Desktop.
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