News for hackers. Stuff that matters.
Re:Devhints: A collection of developer cheatsheets by anacleto on Monday July 23, 2018 @12:41PM (#17593895)
From ES6 section, first thing I notice:

> let is the new var. Constants work just like let, but can’t be reassigned. See: Let and const

I say it once, I say it one thousand times: "Let is not the new Var".

They certainly have some similar behaviors but surely they do communicate very different things to a developer who is reading the code.

let: "you shouldn't/can't edit outside this block scope"

var: "feel free to change me whenever you want inside this scope (whether it's global or function)

JS stuff aside, this is actually very helpful.

Re:Devhints: A collection of developer cheatsheets by ChrisSD on Monday July 23, 2018 @01:01PM (#17594045)
I think the point being made is that `var` used to be the default assignment operator due to a lack of better options. This has now changed. And it's debatable whether `var` is still useful given its "odd" (i.e. unexpected) behaviour.

Personally I'd go further and say `const` should be used by default and `let` should be reserved for when you really need it.