Good advice nowadays!
https://twitter.com/goodmodule/status/915541210391040000 …
You can add location information to your Tweets, such as your city or precise location, from the web and via third-party applications. You always have the option to delete your Tweet location history. Learn more
In some cases we cannot prove that there's no reassignment, so const is the safe choice.
Are you referring to globals, or are there other cases where you wouldn't be able to prove this?
There are also cases where we cannot prove this locally. Since this happens during preparsing it's just a heuristic. cc @marjakh
Is that also true about let or just var?
I think we use the same heuristic for let.
I think you'll get more mileage out of optimizing statically un-mutated lets than trying to convince everyone to use const more.
Even if performance was the same. Const and let make the code much more expressive. Easier to read.
Don't agree, but this convo is about perf (by a VM engineer)
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.