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
-2
u/lordxeon Apr 01 '18
I don't think variables declared inside a function should be declared with const. Any global, or global equivalent are fine being const if necessary.
And, they do cost you something because unless you're running the ES6 code by default, it's being converted back into vars by babel anyway.