title: Why vscode print "undefined" as the result
body: <p>I think the console should return 34 for me,but I got "undefined" in the vscode ide.</p>
  
  <p><a href="https://i.stack.imgur.com/uJSDy.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uJSDy.png" alt="enter image description here"></a></p>
  
  <p>I run below code in the chrome, then I got 34.</p>
  
  <p><a href="https://i.stack.imgur.com/Oxn43.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Oxn43.png" alt="enter image description here"></a></p>
  
  <p>I want to know why,and if my settings is the reason, how should I modify the settings?</p>
  
  <pre><code>   function foo() {
          console.log( this.a );
      }
  
      var obj = {
          a: 2,
          foo: foo
      };
  
      var bar = obj.foo;
  
      var a = 34;
  
      bar();
  </code></pre>
  
  <p>Thanks</p>