title: How to use array push with filter and map method in JavaScript
body: <p>I have a filter method that filters an item from an array using an <code>if</code> condition. Using the <code>filterArray</code> I then use map method.</p>
  
  <p>I would like to add a second condition and push a new array called <code>OLD_ITEMS</code> to the <code>ITEMS</code> array. How would I go about doing this?</p>
  
  <pre><code>import { OLD_ITEMS, ITEMS } from './constants';
  
  let filterArray = ITEMS.filter(item =&gt; {
      if (item.id === 'three') {
          return false;
      }
      return true;
  });
  
  // TODO: add second condition here to push `OLD_TIMES` to `ITEMS`  
  
  const options = Object.assign(
      ...filterArray.map(({ id, name }) =&gt; ({ [id]: name }))
  );
  </code></pre>