title: Javascript accessing inner function from outside
body: <p>I have the following <s>json</s> object</p>
  
  <pre><code>{
   ....
   ....
   data: function() {
      var x = 10;
      function isBig() {
          return x&gt;6;
      }
      return x;
   }
  }
  </code></pre>
  
  <p>I want the <code>isBig</code> to be a function inside data.</p>
  
  <p>When I call <code>data.isBig</code> I am getting <code>undefined</code> and <code>data.isBig()</code> gives me an error saying <code>isBig</code> is not a function. </p>