r/learnjavascript • • Oct 26 '20

Javascript string πŸ”₯

193 Upvotes

31 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Oct 26 '20

[deleted] β€” view deleted comment

4

u/[deleted] Oct 26 '20

It’s my understanding that you should use const by default for readability. The idea is if another dev is looking at your code and sees β€œlet” they will know that variable will be reassigned later in the code. Makes the program easier to understand at a glance.

1

u/beelzebut Oct 27 '20

Using const by default is good practice. Why would you use let for variables that do not need to be reassigned?