title: Merge multiple arrays based on their index using javascript
body: <p>I need to merge two arrays into a single array.  I have code but it is not working as expected-- it is merging them one after another, but I need to interlock the values.</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>&lt;html&gt;
  
  &lt;head&gt;
      &lt;title&gt;&lt;/title&gt;
      &lt;script src="https://code.jquery.com/jquery-3.1.1.js"&gt;&lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;div id="result"&gt;&lt;/div&gt;
      &lt;script type="text/javascript"&gt;
      var array1 = [1, 2, 3, 4];
      var array2 = ["a", "b", "c", "d"];
      var newArray = $.merge(array1, array2);
      $("#result").html(newArray);
      //the result its 1234absd
      //ineed result like 1a,2b,3c,4d
      &lt;/script&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>