title: Merge 1d and 2d array to create a new 1d array in javascript
body: <p>I have 2 arrays as such:</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-js lang-js prettyprint-override"><code>let x = ['1min', '2min', '3min', '4min']
  let y = [
    ['a', 'b', 'c', 'd'],
    ['e', 'f', 'g'],
    ['h', 'i', 'j'],
    ['k', 'l', 'm']
  ]
  
  let z = x.map(function(e, i) {
    return [e, y[i]];
  });
  
  console.log(z)</code></pre>
  </div>
  </div>
  </p>
  
  <p>the output i'm trying to get is this:
  <code>z = [[a,'1min'], [b,'1min'], [c,'1min'], [e,'2min'], [f,'2min'], [g,'2min'], [h,'3min'], [i,'3min'], [j,'3min'],  ...]</code></p>