title: How do I change dev tools console scope to be local to a function?
body: <p>How do I use Chrome dev tools to evaluate code within the local scope of a function? I.e. for the following code</p>
  <pre><code>const name1 =&quot;alireza&quot;
  
  function person(){
      const name2 =&quot;joe&quot; 
  }
  </code></pre>
  <p>the result of code manually executed in the console should be</p>
  <pre><code>console.log(name2) //&quot;joe&quot;
  </code></pre>