title: Javascript's .includes function not working correctly with array of objects
body: <p>I have an array of objects which I'm using the <code>.includes()</code> function. I'm searching this array with an object that is in the array (Objects are identical). However there doesn't appear to be a match. I have replicated the problem in <a href="https://jsfiddle.net/6dua0u0n/" rel="noreferrer">this fiddle</a>. The code is also below. So what is the correct way to check if an array contains am object? </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>let list1 = [{
      name: "object1"
    },
    {
      name: "object2"
    },
    {
      name: "object3"
    },
    {
      name: "object4"
    }
  ]
  
  
  if (list1.includes({
      name: "object1"
    })) {
    document.write('contains')
  } else {
    document.write('doesnt')
  }</code></pre>
  </div>
  </div>
  </p>