in my case i want something like
[10,5,15,20,25] -> [ 2, 1, 3, 4, 5 ]
function ratio(array){_x000D_
let min = Math.min(...array);_x000D_
let ratio = array.map((element)=>{_x000D_
return element/min;_x000D_
});_x000D_
return ratio;_x000D_
}_x000D_
document.write(ratio([10,5,15,20,25])); // [ 2, 1, 3, 4, 5 ]
_x000D_