title: is local variable stay in memory in javascript?
body: <p>I have one question is local variable stay in memory in javascript ?.</p>
  
  <p>if <strong>NOT</strong></p>
  
  <p>then from where <code>this.getSecond</code> function get <code>second</code> variable value ?</p>
  
  <pre><code>function ClassA(){
  this.first ='test';
  var second ='abc';
  this.getSecond =function(){
  return second
  }
  
  }
  
  var a =new ClassA();
  alert(a.getSecond())
  </code></pre>
  
  <p>if <strong>YES</strong></p>
  
  <p>where local variable store ?</p>
  
  <p>fiddle link
  <a href="https://jsfiddle.net/pmwu742d/" rel="nofollow noreferrer">https://jsfiddle.net/pmwu742d/</a></p>