Floating points and javascript

If you need to be reminded that floating points are painful in javascript try multiplying 276.22 by 100:

To fix it do this:

var result = Math.round(original*100);

or var result = orginal * 100; console.log(result.toFixed(2)

more