function compareNumeric(a, b) {
if (a > b) return 1;
if (a == b) return 0;
if (a < b) return -1;
}
let per = [9.4, 9.7, 9.3, 4.5];
let perOrder = [];
perOrder = per.sort(compareNumeric);
console.log(per);
console.log(perOrder);
https://jsfiddle.net/Nata_Hamster/kq3d9px2/
Now both arrays are [4.5, 9.3, 9.4, 9.7], but I need not changed [9.4, 9.7, 9.3, 4.5] too.