5 ms·
Why the `var`s everywhere in the example? They should really be `const`s
by s4vi0r 9y ago
Why the `var`s everywhere in the example? They should really be `const`s
- deleted 9y ago[deleted]
- inimino 9y ago`var` still works everywhere, right?
- akvadrako 9y agoCurrent coding examples should be using the current best practice, which is const. If you want to support old browsers without compiling the JS, you are going to have a lot more issues than const/var and is not for beginners.
- rapind 9y agoIt's actually pretty easy to support older browser's without getting into the packaging mess if you don't need a modern framework. Learning webpack is a distraction from learning programming and would overwhelm a lot of the audience IMO.
- inimino 9y agoThe difference between `var` and `const` is irrelevant for beginners. `var` also happens to be the standard on deployed browsers and existing code, and every beginner should recognize it. It’s the least substantive thing you could pick to criticize about this code.