title: Uncaught TypeError: Cannot read property 'push' of undefined
body: <p>i can push an item to prices array when invoked in console but not when i click the button..    </p>
  
  <pre><code>&lt;input type="text" id = "currentPrice"&gt;
  &lt;button type="button" id = "calcButton"&gt;Show&lt;/button&gt;
  
  var Newchart = function () {
      this.prices = []
  }
  Newchart.prototype.addNewprice = function () {
      var priceValue = +(document.getElementById('currentPrice').value);
      this.prices.push(priceValue);
      console.log('hello')
  }
  var c = new Newchart();
  var el = document.getElementById("calcButton");
  el.addEventListener("click", c.addNewprice, false);
  </code></pre>