Skip to content

Instantly share code, notes, and snippets.

@mnickel
Created October 10, 2012 15:04
Show Gist options
  • Save mnickel/3866194 to your computer and use it in GitHub Desktop.
Save mnickel/3866194 to your computer and use it in GitHub Desktop.
reference hell
$.Foo = function() {
this.bar = new $.Bar();
this.biz = new $.Biz();
this.bar.setBiz(biz);
this.biz.setBar(bar);
};
$.Bar = function(biz) {
this.biz;
this.bar1 = function() {
console.log("hello bar1, i can see biz: " this.biz.biz1());
};
this.setBiz = function(biz) {
this.biz = biz;
};
};
$.Biz = function(bar) {
this.bar;
this.biz1 = function() {
console.log("hello biz1, i can see bar: " + this.bar.bar1());
}
this.setBar = function(bar) {
this.bar = bar;
};
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment