Added numeric separator for improve readability#283
Added numeric separator for improve readability#283ryanmcdermott merged 1 commit intoryanmcdermott:masterfrom
Conversation
|
Is this native to JavaScript? I don't think we should be adding layers to this document that depend on third party libraries. |
|
@markgoho Yes, this is supported by new browser |
|
@markgoho If you want to sure about it you open chrome dev tools and try it |
|
@uxitten Indeed, browser support is high However, browser support Ultimately, I don't think it's the goal of this repo to introduce new concepts (methods, syntax, grammar) in JavaScript. If the author wants to use ES5 for everything, they're welcome to. The goal of the repo is to show concepts of clean code and one can certainly achieve that without using every new bit of JavaScript that makes it into the browser. |
|
Hey there! 👋 I really love the numeric separator and your PR regarding it! Very handy for readability, and this project is emphatic on that being an essential facet for clean code. Some history: This project started without a focus on any particular "dialect" of JS, insofar as new features constituted a dialect change. I fundamentally don't think the dialect really matters because in practice (based on Node's 2018 user survey as corroboration) ~70% of people use transpilers anyway. That number continues to grow. All that to say.... I want this project to continue to be updated with better JS features, without explicitly making this guide about "use this wizbang new great JS feature". It's all about whatever represents the Clean Code concepts the best without trying to introduce any new concepts if possible. If that means a new feature, then so be it! I'm going to merge this PR since it helps readability, and that's the end goal. Thanks for your work, please feel free to contribute even more if you ever have the chance! |
const MILLISECONDS_IN_A_DAY = 86_400_000;We can use numeric separator with
https://babeljs.io/docs/en/babel-plugin-proposal-numeric-separator