DEV Community


Discussion on: What’s the difference between using “let” and “var”?

ricobrase profile image
Rico Brase

There are still some browsers that don’t support let at all :

Yes, true, but one should have a look at the percentage at the top right on Can I Use?.
let is supported by over 96% of the users and therefore it's fine for the majority of use cases to be used without transpiler in browsers.

If someone hasn't cared to update his browser in the past 3 years (since 2017 let is supported by every major browser, even most of 2016, subtracting Safari beeing late to the party), you should ask yourself, if those are actually part of your target audience and if you need to provide compatibility for them.

It makes development easier by removing (in this case) unnecessary steps in the build process and your application size will usually profit, too.

PLEASE don't make newbies believe, they need to aim at 100% compatibility with every browser version ever released, making somewhat up-to-date software a requirement for your application is a valid (and often preferred) step in software development.