title: How to access outer object in javascript objects
body: <p>Assume code like. I want to access i and j in some function somefunc. How will this be achieved?</p>
  
  <pre><code>var myObj = function(){
  Object.defineProperty(this, 'j'){
   get: function() { return 1;}
  };
  }
  
  myObj.prototype =  Object.create(null);
  myObj.prototype={
     constructor : myObj,
     i : 1,
     somefunc : function(){
         console.log(i + j);
     }
  }
  </code></pre>