|
|
|
|
|
by masklinn
3204 days ago
|
|
> That way, it's clear what I'm doing and what my intentions are. It's the exact opposite since you're defaulting to the most permissive binding style. Defaulting to `const` would actually make it clear what your intent is: you use `let` if you need mutable bindings and you use `var` if you need hoisting. If you default to `var` your intent is apparently to make use of mutable bindings and hoisting everywhere, at which point I can only expect that you put your variable declarations at the bottom of your function blocks after the `return` statement. |
|
If you're putting your variable declarations after your return statement, then you probably have other problems. I also don't know why you would ever expect someone to do that.