Skip to content

Instantly share code, notes, and snippets.

@quirkey
Created April 7, 2009 15:03
Show Gist options
  • Select an option

  • Save quirkey/91273 to your computer and use it in GitHub Desktop.

Select an option

Save quirkey/91273 to your computer and use it in GitHub Desktop.
var MyObject = {
attribute1: 'test',
attribute2: function() {
return this.attribute1;
}
};
MyObject.attribute1 #=> 'test'
MyObject.attribute2 #=> function()
MyObject.attribute2() #=> 'test'
MyObject.attribute3 = MyObject.attribute2;
MyObject.attribute3() #=> 'test'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment