title: JavaScript prototype array member cannot find push of undefiend
body: <p>I am trying to implement a stack. when I try to push into the arr this error pops up</p>
  
  <blockquote>
    <p>TypeError: Cannot read property 'push' of undefined</p>
  </blockquote>
  
  <pre><code>var MinStack = function() {
      let Min = null;
      const arr = new Array(); // I also tried arr = []
  };
  
  /** 
   * @param {number} x
   * @return {void}
   */
  MinStack.prototype.push = function(x) {
      this.arr.push(x);
      this.Min = Math.min(...arr);
  };
  </code></pre>
  
  <p>I searched for answers but I didn't find out why can't I access my arr in the constructor?</p>