title: Why does [NaN].includes(NaN) return true in JavaScript?
body: <p>I'm familiar with <code>NaN</code> being &quot;weird&quot; in JavaScript, i.e., <code>NaN === NaN</code> always returns <code>false</code>, as described <a href="https://stackoverflow.com/a/23666623/4574731">here</a>. So one should not make <code>===</code> comparisons to check for <code>NaN</code>, but use isNaN(..) instead.</p>
  <p>So I was surprised to discover that</p>
  <pre><code>&gt; [NaN].includes(NaN)
  true
  </code></pre>
  <p>This seems inconsistent. Why have this behavior?</p>
  <p>How does it even work? Does the <code>includes</code> method specifically check <code>isNaN</code>?</p>