Edit in JSFiddle

var foo = function foo(){
    this.arg1 = 'arg1'
    var bar = function bar(){       
        document.write(bar.caller.arg1); //affiche undefined
        document.write(bar.caller.arg2); //affiche arg2
    }();
}
foo.arg2 = 'arg2';
new foo();