title: How to call factory function method inside return?
body: <pre class="lang-js prettyprint-override"><code>function shared() {
    return {
      lot: function() {
        console.log('crawling');
      },
      pot: function() {
        lot();
        console.log("crawled");
      }
    }
  }
  var share = new shared();
  share.pot();
  </code></pre>
  
  
  
  <p>Throwing </p>
  
  <blockquote>
    <p>error lot is not a function </p>
  </blockquote>
  
  <p>how to call lot method</p>
  
  <p>I have existing function structure like this, how can I call lot method without changing structure </p>