I use const all the time. It's very rare that I need let. I can see let being used as an index in a for loop, but I almost never need a for loop. Filter, map and reduce usually do the trick.
Functional and immutable Js makes code more readable and maintainable imo. I almost exclusively use const, I have yet to find a scenario where I need to change this.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I use
constall the time. It's very rare that I needlet. I can seeletbeing used as an index in a for loop, but I almost never need a for loop. Filter, map and reduce usually do the trick.We're in the same boat! I try to avoid
letand even loops, which people think I'm crazy for.Map,FilterandReduceare loops, but they are immutable for the purpose of us devs.They're declarative loops, but yes definitely loops.
Functional and immutable Js makes code more readable and maintainable imo. I almost exclusively use
const, I have yet to find a scenario where I need to change this.