4 ms·
We also favor using const as a default for everything in our team's code. When someone uses let, it's right away obvious that the reference will change. One c
by bubersson 10y ago
We also favor using const as a default for everything in our team's code.
When someone uses let, it's right away obvious that the reference will change.
One case that surprised me a bit is that it's correct to use const in for-of loop, e.g.
for (const a of arr) {}
- spraak 10y agoI've been using a lot of const function declarations `const fn = (i) => ...`