title: Why am I getting ".at" is not a function?
body: <p>I know how to index an array with <code>[]</code> but I'm trying to display an item from an array based on its index using <code>Array.at()</code> method as described here <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/at" rel="noreferrer">MDN Docs - <code>Array.at</code></a></p>
  <p>But I get the following error:</p>
  <blockquote>
  <p>Uncaught TypeError: arr1.at is not a function</p>
  </blockquote>
  <p>I double-checked it, and everything is ok, however I don't know what's going wrong.</p>
  <p><strong>Here is my code:</strong></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>const arr1 = [10, 20, 30, 40, 50];
  
  const res = arr1.at(2);
  console.log(res);</code></pre>
  </div>
  </div>
  </p>
  <p><strong>Note</strong>: This is different than the proposed duplicate of <a href="https://stackoverflow.com/q/8238456">How to get value at a specific index of array In JavaScript?</a>.  That question is about methods for accessing an array, this question is why a new API for doing so is unavailable and how to rectify that.</p>