How to always round a number UP to the nearest penny in Javascript
javascript
Solution
The Math.ceil(x) function returns the smallest integer greater than or equal to a number "x".
var rounded = Math.ceil(yourNumber * 100)/100;
Problem
I have a bunch of numbers, for example `797.3333333333334`, `852.22222111`, `933.111023`, which I want to ALWAYS round up to the nearest penny, such that the numbers I already mentioned would be `797.34`, `852.23`, `933.12`, respectively. I said the nearest penny, but you might also call it the nearest tenth. There is a ceiling function, but that only rounds to the nearest integer, as does `Math.round()`