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 i
// Everything fine but small mistake down there function sortedArray(a,b){ for(var i=0;ia[j]) { temp=a[i]; a[i]=a[j]; a[j]=temp; } } } // for(i=0;i