402.39 - 226.96 = 175.43
I took this screenshot from my MSE console. This is not complex calculations. I've been scratching my head into why my equations were not giving me the right numbers until I decided to try the equation in Edge's console to find out that the problem seems to be the Browser and not me.
Am I missing something, did I forget anything?
Since I could not figure out the problem in my code, I chose to hard code values in my variable and reduce my code to the plain minimum:
var ltotal = 402.39 - 226.96;
document.getElementById("txtotal").value = ltotal.toString();
Initially, I thought I needed to round. But it's absolutely unecessary to round anything here. Clearly something is not correct or I missed something.
Is there a javascript rule I may have forgoten?