Here is the code and fiddle:
var test = function(){
return{
value: "hi",
func1: function(){
func2();
}()
};
}();
function func2(){
alert(test.value);
}
Can anyone tell me what have I done wrong? I can't get test.value.