title: check if new item is already exist in array typescript
body: <p>I've a class with properties: </p>
  
  <pre><code>id: number;
  motorcycleId: number;
  brand: string;
  model: number;
  year: string;
  isDeleted: boolean;
  </code></pre>
  
  <p>Then in my component, I've a array of this model</p>
  
  <pre><code>motorcyclesList: MotorcycleModel[];
  </code></pre>
  
  <p>Then, I want to check if I'm adding a new motorcycle, check if it already exist in array.</p>
  
  <pre><code>        if (this.motorcyclesList.find(x =&gt; x.model === this.motorcycle.model &amp;&amp; 
          x.motorcycleId === this.motorcycle.motorcycleId &amp;&amp;
          x.year === this.motorcycle.year)) {
          //some logic if exst
      }
  </code></pre>
  
  <p>And here I've always false.</p>