vas88811,
var arr3 = [5, 8, 6, 9];
var arr4 = [1, 3, 7, 5];
arr4.forEach(function (el, i, arr)
{
arr[i] = [arr[i],arr3[i]]
})
arr4.sort(function(a,b){return b[0] - a[0]});
var arr6 = arr4.map(function (el, i, arr)
{
arr[i]=el[0];
return el[1]
})
alert(arr4+'\n'+arr6)