title: It Gives NaN instead of Content of array
body: <p>This is a basic JavaScript code to calculate "tips" for a given value. Am I doing anything wrong here? It is giving me <code>null</code> arrays or <code>NaN</code> instead of my array content.</p>
  
  <pre class="lang-js prettyprint-override"><code>var john = {
  
    fullName: 'john smith',
    bills: [124, 48, 32, 268, 180, 42],
  
    calcTips: function () {
      this.tips = [0];
      this.finalvalue = [0];
  
      for (var i = 0; i &lt; this.bills.length; i += 1) {
        var percentage;
  
        if (this.bills[i] &lt; 50) {
          percentage: .2;
        }
        else if (this.bills[i] &gt;= 50 &amp;&amp; this.bills[i] &lt; 200) {
          percentage: .15;
        }
        else {
          percentage: .1;
        }
  
        this.tips[i] = this.bills[i] * percentage;
        this.finalvalue[i] = this.bills[i] + this.bills[i] * percentage;
      }
    }
  }
  </code></pre>