title: Accessing "this" in javascript object literals
body: <p>I'm trying to get this piece of code to work, but can't figure out why <code>myInvoice.amount</code> is evaluating to <code>NaN</code>.</p>
  <p>I initially thought it had something to do with the value of <code>this</code>, but if that were the case, why is myInvoice.total() working correctly?</p>
  <pre class="lang-js prettyprint-override"><code>function createInvoice(services = {}) {
    return {
      phone: services['phone'] || 3000,
      internet: services['internet'] || 5500,
      amount: (this.phone + this.internet),
  
      total() {
        return this.phone + this.internet;
      },
  
    };
  }
  
  let myInvoice = createInvoice(); 
  console.log(myInvoice.phone); // 3000
  console.log(myInvoice.internet); // 5500
  console.log(myInvoice.amount); // NaN
  console.log(myInvoice.total()); // //8500
  
  </code></pre>
  <p>I've also checked the typeof <code>phone</code> and <code>internet</code> and they're both numbers. I've also included what gets logged to the console in a comment next to the expression.</p>
  <p>Any help would be appreciated!</p>
  <p>Thanks</p>