News for hackers. Stuff that matters.
Re:Constantly Confusing ‘const’ by dsjoerg on Tuesday September 08, 2015 @05:51PM (#10188406)
When you say "don't use [var]" do you mean only in ES6, or even before ES6?

If before ES6, then if you could explain your reasoning more I'd be interested to hear it. I use var regularly, but would be happy to be re-educated.

Re:Constantly Confusing ‘const’ by orangeshark on Tuesday September 08, 2015 @06:32PM (#10188573)
There is no alternative to var before ES6, so of course your only option is to use it. If you use any of the various compilers that introduce let and const, it is recommended to use them over var. These compilers basically just check, at compile time, those variables satisfy the correct behaviors of let and const and just converts them to var for ES5 and below.