title: JavaScript map returning undefined for some elements
body: <p>Given the following array of member data, I'm to return an array of <code>memberID</code>'s for members whose membership status not current.</p>
  
  <p>Here's the member data:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>var members = [
    {
      firstName: 'Howard',
      lastName: 'Lee',
      membershipIsCurrent: true,
      MemberID: 235
    },
    {
      firstName: 'James',
      lastName: 'Icharis',
      membershipIsCurrent: false,
      MemberID: 236
    },
    {
      firstName: 'Thomas',
      lastName: 'Cronquist',
      membershipIsCurrent: true,
      MemberID: 237
    },
    {
      firstName: 'Philip',
      lastName: 'Grover',
      membershipIsCurrent: false,
      MemberID: 238
    },
    {
      firstName: 'Eric',
      lastName: 'Broadstone',
      membershipIsCurrent: true,
      MemberID: 239
    },
    {
      firstName: 'Hunter',
      lastName: 'Gonzales',
      membershipIsCurrent: true,
      MemberID: 240
    }];</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is my code to grab that data:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>function lapsedIDs (array ) {
    return array.map( function ( member ) {
      if ( member.membershipIsCurrent === false ) {
        return member.MemberID;
      }
    });
  }
  
  lapsedIDs(members);</code></pre>
  </div>
  </div>
  </p>
  
  <p>Here is the result.  I don't understand why it's returning <strong><code>undefined</code></strong> for each member whose membership has NOT lapsed.  Any pointers??</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>[ undefined, 236, undefined, 238, undefined, undefined ]</code></pre>
  </div>
  </div>
  </p>