Created
August 7, 2016 14:14
-
-
Save tonykambo/4faf993c85a098ba5bd6e11bc8d91c6a to your computer and use it in GitHub Desktop.
Redeuces to 2 decimal places. toFixed returns a string so run parseFloat again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
parseFloat(parseFloat("2039.43485").toFixed(2)); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment