title: Javascript this in global context doesn't work, or seems like console.log works but using ref doesn't work
body: <p>So I am wondering the difference between the two calls in below code: 
  My understanding is once I get ref to function using user.credential.getID , I should be able to execute it and which seems to work fine in console.log(user.credentials.getID());// it works</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>const user = {
    id: 551,
    name: 'Tom',
    getID() {
      return this.id;
    },
  
    credentials: {
      id: 120,
      name: 'Jack',
      getID() {
        return this.id;
      }
    }
  
  }
  var getId = user.credentials.getId;
  console.log(getId); // undefined why?
  console.log(user.credentials.getID()); // it works</code></pre>
  </div>
  </div>
  </p>