title: Nested map not returning
body: <p>This code should return [1, 7]. It returns undefined. I can't figure out how to get the function to return.</p>
  <p>I have seen <a href="https://stackoverflow.com/questions/50342853/nested-map-loops-return-not-returning-anything">this</a> but it has not helped.</p>
  <pre><code>let sumPairs = (arr, s) =&gt; {
    arr.map((item1, index) =&gt; {
      return arr.map((item2) =&gt; {
        if (item1 + item2 === s) 
          console.log([item1, item2])
          //[ 1, 7 ]
          //[ 4, 4 ]
          //[ 7, 1 ]
          return [item1, item2]
      }, index);
    });
  }
  </code></pre>