title: How js differentiates between getters and setters
body: <p>For example, I have the following:</p>
  
  <pre><code>var o = {
    get path() {
      return _path;
    }
    set path() {
      _path=p;
    }
  }
  </code></pre>
  
  <p>And call it like that:</p>
  
  <pre><code>o.path // getter is called
  o.path = 4 // setter is called
  </code></pre>
  
  <p>How does js know which function to call in each case?</p>