The behavior of \"this\" when function bar is called is baffling me. See the code below. Is there any way to arrange for \"this\" to be a plain old js object in
bar
this.bar(); // when called here, "this" is the foo instance
this comment is wrong when foo is used as a normal function, not as a constructor. here:
foo();//this stands for window