Rounding fixed decimals

by steveukx

JavaScript

var div = document.body.appendChild(document.createElement('div'));

div.appendChild(document.createTextNode("((0.009).toFixed(1) + Math.round(0.009 * Math.pow(10, 2))).replace(/\.0+$/, '');"));

div.appendChild(document.createTextNode(((0.009).toFixed(1) + Math.round(0.009 * Math.pow(10, 2))).replace(/\.0+$/, '') == '0.01'));