title: How to create a JS object from arrays
body: <p>I have two arrays</p>
  <pre><code>const time = ['00:00', '00:30', '01:00', '01:30']
  
  const cost = [1.40, 5.00, 2.00, 3.00]
  </code></pre>
  <p>And I want to merge them into an array of objects with keys like so:</p>
  <pre><code>result = [
      {
          time: '00:00',
          cost: 1.40
      },
      {
          time: '00:30',
          cost: 5.00
      },
      {
          time: '01:00',
          cost: 2.00
      },
      {
          time: '01:30',
          cost: 3.00
      }
  ]
  </code></pre>