When you ask javascript to minus decimals, a lot of them (like 0.5-0.4) will not give you the correct answer. For example 0.5-0.4 should equal 0.1 but instead gives 0.09999999999999998.
console.log(0.5-0.4);
0.09999999999999998
I tried to search but couldn't find an answer. Is there an easy solution to this without doing a workaround like taking out the decimal and then putting it back in?