title: How can I use optional chaining with arrays and functions?
body: <p>I'm trying to use optional chaining with an array instead of an object but not sure how to do that:</p>
  <p>Here's what I'm trying to do <code>myArray.filter(x =&gt; x.testKey === myTestKey)?[0]</code>.
  Also trying similar thing with a function:</p>
  <pre><code>let x = {a: () =&gt; {}, b: null}
  console.log(x?b());
  </code></pre>
  <p>But it's giving a similar error - how can I use optional chaining with an array or a function?</p>