Is it possible to have a self executing function which is an objects property value assign values to other properties in the object?
e.g. - what I would like to do is this:
var b={
c:'hi',
d:null,
e:new function(){this.d=5}
};
But the "this" inside the new function seems to refer to b.e. Is it possible to access the b.e parent (i.e. b) from inside the function?
newoperator! (Except for selfmade objects) Also you should read something about scope and closures in Javascript.(function(){}())but "this" inside the function referred to the Window object rather thanbusing thenewoperator seemed to be the only way to get access tobinside the function.