title: Javascript prototype function returning NAN
body: <p>I am following the notes on ES6 from this <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Classes" rel="nofollow noreferrer">link</a> and created a small code snippets to play around.</p>
  
  <pre><code>class Bar{
      constructor(x,y){
          this.x = x;
          this.y = y;
      }
  }
  let bar = new Bar(12,10);
  Bar.prototype.foo =function(){
      return this.x + this.y;
  }
  bar.foo() // 22 correct
  </code></pre>
  
  <p>I am so happy until i do this.</p>
  
  <pre><code>let baz = bar.foo
  baz(); // NaN
  </code></pre>
  
  <p>Why baz() is printing <strong>NaN</strong> ?</p>