I'd like to round at most 2 decimal places, but only if necessary.
Input:
101.77777779.1
Output:
101.789.1
How can I do this in JavaScript?
Use Math.round(num * 100) / 100
Math.round(num * 100) / 100
I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print ...
No comments:
Post a Comment