Skip to content

Instantly share code, notes, and snippets.

@bcherry
Created February 19, 2010 20:48
Show Gist options
  • Save bcherry/309189 to your computer and use it in GitHub Desktop.
Save bcherry/309189 to your computer and use it in GitHub Desktop.
var foo = {
bar: "foobar",
func: function () {
return this.bar;
}
};
foo.func(); // "foobar"
var functionReferences = {};
functionReferences.bar = function () { return "some function"; }
functionReferences.foofunc = foo.func;
functionReferences.fooFunc(); // function () { return "some function"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment