title: how to merge two sorted array in one sorted array in JavaScript without using sort()
body: <p>In this program merged two array and then sorted using temp.but this not correct method.because two array are sorted ,so method should be unique i.e. merging of two sorted in sorted form should be unique.</p>
  
  <p>Example:</p>
  
  <ul>
  <li><code>a=[1,2,3,5,9]</code></li>
  <li><code>b=[4,6,7,8]</code></li>
  </ul>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>function mergeSortdArray(a,b){
   for(var i=0;i&lt;b.length;i++){
    a.push(b[i]);
   }
   //console.log(a);
  for(i=0;i&lt;a.length;i++)
      {
          for(j=i+1;j&lt;a.length;j++)
          {
              if(a[i]&gt;a[j])
              {
                  temp=a[i];
                  a[i]=a[j];
                  a[j]=temp;
              }
          }
      }
      return a;
  }
  console.log(mergeSortedArray([1,2,3,5,9],[4,6,7,8]));</code></pre>
  </div>
  </div>
  </p>