Re:Overview of JavaScript ES6 features
by strainer on Monday October 24, 2016 @02:06PM
(#12781211)
The only difference between const and let is it flags an error on reassignment (in strict mode), so that is its primary purpose. It can also be used to conspicuously note intent not to reassign but it is not helpful to VMs or programmers to explicate whether or not each and every variable is reassignable. Maybe just get on board with those influential developers and use const to lock things down (in strict mode) or to make a point - not because let is 'not needed'. I would rather const was used somewhat sparingly, giving it narrative impact.
[ Parent
| on HN ]
There are no comments on this comment yet.