title: Filter through array and find index for splice
body: <p>I am looking to filter through an array of objects and find the index of either a matching objects date or the closest date to insert a new object after.</p>
  
  <pre><code>let expenseIndex = tempArray.findIndex((a: any) =&gt; a.Date &lt;= expense.Date);
  tempArray.splice(expenseIndex, 0, expense);
  </code></pre>
  
  <p>The <code>&lt;=</code> operator does not seem to work here. If I do <code>==</code> and an expense is found with a matching date i get back the index but when nothing matches I get <code>0</code> or <code>-1</code>. </p>