You-Dont-Know-JS icon indicating copy to clipboard operation
You-Dont-Know-JS copied to clipboard

Types & Grammer - Chapter 2 - Small Decimal Values

Open Oliphaunte opened this issue 9 years ago • 2 comments

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:

Oliphaunte avatar Oct 21 '16 18:10 Oliphaunte

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:

getify avatar Oct 21 '16 19:10 getify

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.

Oliphaunte avatar Oct 21 '16 19:10 Oliphaunte