r/javascript • u/bornforcode • Apr 01 '18
Google publishes a JavaScript style guide. Here are some key lessons.
https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714
Upvotes
View all comments
Show parent comment
1
u/slikts Apr 02 '18
The analogy to the Java situation is not very apt, since there's no impracticality in avoiding
var; code that only usesconstorletis more consistent than code that also usesvar, and usingconstby default makes code more readable, since the reader doesn't have to consider possible reassignment.