Because you can't compare floating point numbers. You need to check their difference - `console.log(0.1 + 0.2 - 0.3 < 0.001);`
– Artem MostyaevJul 14 '16 at 06:55
1
Take a look at [How to deal with floating point number precision in JavaScript?](http://stackoverflow.com/questions/1458633/how-to-deal-with-floating-point-number-precision-in-javascript)
– oberbicsJul 14 '16 at 06:56