title: JS: Handle with find() property undefined
body: <p>I have a method which returns a value from an element in the array. Not all the elements have the property I want to return. I would like to do this function with one line using the method <code>find()</code>. I've tried this way to solve it: </p>
  
  <pre><code>getExecsFromTour(tourId){
   return this.repInfo.find(el =&gt; el.id == tourId ).execs || [];
  }
  </code></pre>
  
  <p>But the elements which don't contain the property <code>execs</code> return an error of <code>undefined</code>. </p>
  
  <p>To solve it, I had to store the result in a local variable: </p>
  
  <pre><code>getExecsFromTour(tourId){
      let items       = this.repInfo.find(el =&gt; el.id == tourId);
      return items    != undefined ? items.execs : [];
  }
  </code></pre>
  
  <p>But I would like to know if I am missing something and this function can be achieved with one sentence.</p>