-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
doc: use const consistently #4147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
LGTM |
1 similar comment
|
LGTM |
|
Why setting |
doc/api/events.markdown
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe just use a function... definition? here. (I forget if that's the correct term or not...)
|
LGTM with @Fishrock123's suggestion |
events.markdown uses `var` and `const` in different places seemingly arbitrarily. This change makes it favor const when possible.
|
OK, changed that |
|
|
|
Did a quick search, lots of In the same vein, one could say this change here is unnecessary, so I think I'll have to redact my LGTM. |
|
@silverwind The reason why I did it for this doc in particular is that there were conflicting examples. Well, not really conflicting, but inconsistent. One used |
|
(I'd be just as happy to convert the existing |
|
(One argument for |
|
I actually find that last argument (strict mode) compelling and am closing this PR. |
events.markdownusesvarandconstin different places seeminglyarbitrarily. This change makes it favor
constwhen possible.