Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"toFixed" - why does it exists? #93

Open
yairEO opened this issue Mar 5, 2017 · 1 comment
Open

"toFixed" - why does it exists? #93

yairEO opened this issue Mar 5, 2017 · 1 comment

Comments

@yairEO
Copy link

yairEO commented Mar 5, 2017

excuse me but I want to understand why did you make your own "toFixed" method when there's one already exist natively in all browsers? how does it defer?

Thank you

@rossjcooper
Copy link

Looking in the code I believe they added it to fix binary rounding issues that native .toFixed() has

// Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants