Fixed-point numbers (aka "decimal" type in Java, C# and others) are the preferred way to deal with this problem as I mentioned in this same discussion hours ago.
Now, in the example you presented, you have a round-off error amplication problem where the round-off error grows larger than the epsilon. You can avoid that using the Kahan summation algorithm.
https://en.wikipedia.org/wiki/Kahan_summation_algorithm
const arr = [0.1, 0.2, 0.9, 0.6];
let sum = 0.0;
let c = 0.0;
for(let i = 0, l = arr.length; i < l; i++) {
y = arr[i] - c;
t = sum + y;
c = (t - sum) - y;
sum = t;
}
Now you evaluate sum, and it's 1.8 as expected.