title: How to access JavaScript function which is in function which is in function
body: <p>Is there any way to access a function which is inside a function, which is inside an other function in JavaScript?</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function x(name, age) {
    this.name = name;
    this.age = age;
  
  
    this.a = function() {
      this.b = function() {
        return "b";
      };
  
      return "a";
    };
  }
  
  var xobj = new x('vin', 25);
  console.log(xobj.a.b()); //error</code></pre>
  </div>
  </div>
  </p>