You-Dont-Know-JS
You-Dont-Know-JS copied to clipboard
Types & Grammer - Chapter 2 - Small Decimal Values
Probably just me, but I feel like this line in the Small Decimal Values section is worded a little odd?
As of ES6, Number.EPSILON is predefined with this tolerance value, so you'd want to use it, but you can safely polyfill the definition for pre-ES6:
Would it have been clearer as?
As of ES6, Number.EPSILON is predefined with this tolerance value, so you'd want to use it; you can safely polyfill the definition for pre-ES6:
There's something about the "so you'd want to use it" part. I was thinking something like, "so you should use it when possible. For pre-ES6, you can safely polyfill the definition with:"
Sorry if it sounds nitpicking, the idea is understood regardless, but the syntax just caught my eye.