title: Can I define custom operator overloads in Javascript?
body: <p>Is it possible to define custom operators between instances of a type in JavaScript?</p>
  
  <p>For example, given that I have a custom vector class, is it possible to use</p>
  
  <pre><code>vect1 == vect2
  </code></pre>
  
  <p>to check for equality, whilst the underlying code would be something like this?</p>
  
  <pre><code>operator ==(a, b) {
      return a.x == b.x &amp;&amp; a.y == b.y &amp;&amp; a.z == b.z;
  }
  </code></pre>
  
  <p>(This is nonsense of course.)</p>