Re:What’s New in ES2019
by codenirvana on Tuesday July 30, 2019 @05:21PM
(#20569310)
Only helps with const. Better use linting to avoid such issues.
[ Parent
| on HN ]
Re:What’s New in ES2019
by kdmccormick on Wednesday July 31, 2019 @12:01AM
(#20571625)
> Only helps with const.
Can you elaborate?
If the `x` in the example was a const, it would throw an error because the code attempts to assign the value of `y` to `x`. You cannot assign a new value to a const.
Re:What’s New in ES2019
by kdmccormick on Thursday August 01, 2019 @10:51AM
(#20584196)
What I'm saying is that you wouldn't accidentally type `let x = y` when you meant to type `x == y`