Javascript (node.js) Math.floor returning long decimal values - Stack Overflow
I can't seem to get a nice number rounded to the nearest hundredth (ie. 12.57 instead of 12.57000000008). var example = { user : "John", dollars: 12.57 }; setInterval( function() { example.dollars += (parseInt(Math.floor(Math.random()*2000 + 500)) / 100 ....