You have an input field, where user can enter decimal values. Problem is, that some cultures use decimal point “.” and some uses decimal comma “,”. So what is a valid number in one culture, is not a number at all in a different culture. You can see the full list of differences on wikipedia. There is no built-in …
Tag Archives: number
Javascript math. LOL
How much is 77.9 – 70? Usually it is 7.9. Right? But not so in Javascript. In Javascript it is 7.900000000000006. Funny as hell 🙂 You can “fix” this by calling .toFixed() on the result number, but it does not fix the cause. As far as I know you can’t fix it, it is part of …