I was trying something different and ended up with these codes..
var f1 = function() {
             this.x = 10;
             this.innerf = function() {    console.log(this.x);   }
         }
var of1 = new f1();
of1.innerf();
var f2 = function() {
             return function() {
                 this.x = 10;
                 this.innerf = function() {    console.log(this.x);    }
             }
         }
var of2 = new f2();
of2.innerf(); 
It is throwing error ??! of2.inner is not a function
So, my anonymous function is returning same function body to my variable. Why still i cannot able to instantiate??
 
     
     
     
     
    