title: Why Array.indexOf doesn't find identical looking objects
body: <p>I have array with objects.</p>
  
  <p>Something Like this:</p>
  
  <pre><code>var arr = new Array(
    {x:1, y:2},
    {x:3, y:4}
  );
  </code></pre>
  
  <p>When I try:</p>
  
  <pre><code>arr.indexOf({x:1, y:2});
  </code></pre>
  
  <p>It returns <code>-1</code>.</p>
  
  <p>If I have strings or numbers or other type of elements but object, then <code>indexOf()</code> works fine.</p>
  
  <p>Does anyone know why and what should I do to search object elements in array?</p>
  
  <p>Of course, I mean the ways except making string hash keys for objects and give it to array...</p>